<?
$posts = get_posts( array(
'numberposts' => 1000,
'orderby' => 'date',
'order' => 'DESC',
'post_type' => 'services',
) );
$categories = get_terms('services_tax', 'orderby=name&hide_empty=0');
// если рубрики, соответствующие заданным параметрам, существуют,
// тогда создаем выпадающий список из них
?>
<section class="container content">
<div class="row">
<div class="col flex-0-7">
<h1>Услуги</h1>
<div class="tags-list">
<ul class="post_tags">
<?php
$all_terms = get_terms( 'services_tax', array(
'hide_empty' => 0,
'parent' => 0,
) );
foreach ( $all_terms as $term ) {
$term_list = wp_get_post_terms( $post->ID, 'services_tax', array('fields' => 'names') );
var_dump($term_list);
$class = ( has_term('', 'services_tax') ) ? 'current' : '';
echo "<div class='acc-tags'>";
echo "<h6 class='red-text $class'>$term->name</h6>";
echo "<div class='under-text'>";
echo "<ul class='under-list'>";
$query = new WP_Query( array(
'post_status' => 'publish',
'posts_per_page' => -1,
'tax_query' => array(
array(
'taxonomy' => 'services_tax',
'field' => 'slug',
'terms' => $term->slug,
)
)
));
while ( $query->have_posts() ) {
$query->the_post();
?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php
}
echo "</ul>";
echo "</div>";
echo "</div>";
}
wp_reset_postdata();
?>
$price = pods_field_display( 'services_tax', $term->term_id, 'price1', false);
setup_postdata($price);
echo $price;
<?php
if (have_posts()) {
while(have_posts()) {
$servicesTax = get_post_meta($post->ID, 'services_tax', true);
echo $servicesTax;
}
}
?>
Parse error: syntax error, unexpected end of file in C:\Users\12312\Downloads\OSPanel\domains\vita\wp-content\themes\vita\taxonomy-services_tax-kosmetologia.php on line 198
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
foreach ( $terms as $term ) {
$icon = pods_field( 'services_tax', $term->term_id, 'images', true );
$icon_url = $icon['guid'];
$icon_thumb = pods_image_url ( $icon_url, 'large', 0, false ) ;
$term_link = get_term_link($term);
?>
<div class="services-item">
<a href="<?php echo $term_link;?>">
<img src="<?php echo $icon_thumb; ?>" alt="">
</a>
</div>
<?php
}
}