I’ve created a taxonomy and in that taxonomy i’ve created {custom} discipline for picture. Now I wish to present that {custom} discipline picture on my {custom} web page template with class title. I’ve tried a lot it’s not working.
My code is right here beneath:
<?php
// Template Title:Submit By Class
get_header();
?>
<?php
// Get all of the classes
$classes = get_terms( 'newcategory' );
// Loop by way of all of the returned phrases
foreach ( $classes as $class ):
// arrange a brand new question for every class, pulling in associated posts.
$providers = new WP_Query(
array(
'post_type' => 'postlinks',
'showposts' => -1,
'tax_query' => array(
array(
'taxonomy' => 'newcategory',
'phrases' => array( $category->slug ),
'discipline' => 'slug'
)
)
)
);
?>
<div class=" category_card-div d-lg-inline d-sm-block" stylle="peak:450px;">
<div class=" p-0 text-white category_custom_card d-lg-inline-block d-sm-block"
fashion="border: 1px strong #fff;peak:450px; border-radius :15px; overflow:hidden; background:#000;width: 22%;">
<div class="category_card_title bg-danger d-flex align-items-center justify-content-center"
fashion="peak: 80px;">
<h3 class="text-white text-center">
<?php echo $category->title; ?>
<?php if( get_field('favicon') ): ?>
<img class="post-icons-custom" fashion="width: 25px; peak: 25px;"
src="<?php echo get_the_field('favicon'); ?>" />
<?php endif; ?>
</h3>
</div>
<ul class=" custom-post-list">
<?php whereas ($services->have_posts()) : $services->the_post(); ?>
<li>
<?php if( get_field('favicon') ): ?>
<img class="post-icons-custom" fashion="width: 25px; peak: 25px;"
src="<?php the_field('favicon'); ?>" />
<?php endif; ?>
<a category="text-white ml-2" href="<?php the_permalink(); ?>" sytle="hover:text-decoration: none;">
<?php the_title(); ?></a>
</li>
<?php endwhile; ?>
</ul>
</div>
</div>
<?php
// Reset issues, for good measure
$providers = null;
wp_reset_postdata();
// finish the loop
endforeach;
?>
<?php get_footer(); ?>
Now i wish to present like that within the picture beneath: