Support

Account

Home Forums ACF PRO Custom Archive page – how to display custom fields for taxonomy: category?

Unread

Custom Archive page – how to display custom fields for taxonomy: category?

  • Hey guys,

    I’m running into a similar issue as this one asked a long time ago.

    I have a grid where I want to display a category name, a thumbnail and the month of that category. I’ve already succeeded displaying it for one category but I’d like to be able to display it for every coming category without having to hard code it.

    Here’s a snippet:

    <ul class="bycategories">
    <div class="category-info">
    	<?php wp_list_categories('exclude=6,3&title_li='); ?>
    
    	
    	<?php if( get_field('issues_date', 'category_8') ): ?>
    						<h3 class="archive-title", >	<?php the_field('issues_date', 'category_8'); ?></h3>
    							<?php endif; ?>
    	</div>
    	
    				<?php if( get_field('thumbnail-cat', 'category_8') ): ?>
    	<a href="<?php the_permalink(); ?>">
    		<img class="archive-tb" src="<?php the_field('thumbnail-cat', 'category_8'); ?>" alt="" /></a>
    				<?php endif; ?>
    	
    </ul>

    I’ve tried many of the solutions online and even tried to follow along this doc to no avail, I want to be able to display each category’s fields as I create them for each post.

    For reference, I’m attaching a picture of the front end as well. The idea is that each category will display on the grid as it is created with the input of the fields:

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.