public class Car {
private String carNumber, carModel, carOwner;
private Date lastRepairDate, repairedDate;
// Constructors
public Car() {}
public Car(String carNumber, String carModel, String carOwner, Date lastRepairDate, Date repairedDate) {
this.carNumber = carNumber;
this.carModel = carModel;
this.carOwner = carOwner;
this.lastRepairDate = lastRepairDate;
this.repairedDate = repairedDate;
}
// Getters & Setters
// toString()
}
function my_custom_shortcode(){
$my_custom_field = get_field('hello_world');
echo $my_custom_field;
}
add_shortcode('shortcode_tag', 'my_custom_shortcode');
[shortcode_tag]
$my_custom_field = get_field('hello_world','option');
taxonomy-rl_category.php
.hentry, .page-header, .page-content {
margin: 0 !important;
}
.site-main {
padding: 0 !important;
}
/blog/\S{1,100}
<section class="b-article-text_yablogs _init" data-block="b-article-text">
<footer class="b-article_yablogs-not-draft__footer">
Если в шаблоне taxonomy-taxproducts.php прописываю код ниже, то тогда для отдельных категорий все выводится правильно
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php the_title(); ?>
<?php the_content(); ?>
<?php endwhile; else : ?>
<p><?php esc_html_e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>
Все созданные записи у меня выводятся вот в таком формате: sait/product/name-of-the-post
//'rewrite' => array( 'slug' => 'the_genre' ), // свой слаг в URL
Но, возникает вопрос: как вывести все категории созданной таксономии на странице?
<?php
$terms = get_terms( array(
'taxonomy' => 'taxproducts',
) );
echo '<ul class="tax_terms">';
foreach( $terms as $term ) :
echo '<li><a href="'.$term->slug.'">'.$term->name.'</a></li>';
endforeach;
echo '</ul>';
?>