Support

Account

Home Forums General Issues Taxonomy grabbing fields from posts, but in wrong order

Solved

Taxonomy grabbing fields from posts, but in wrong order

  • Hi there,

    Firstly, great plugin thanks!

    But unfortunately I have having issues displaying a slideshow created with ACF fields on taxonomy pages.

    Here is an example: http://anamariaindiodacosta.com.br/wordpress/projetos/comercial/

    It grabs the slideshow from the last post, not the first. The correct order can be seen in the menu dropdown.

    Is there a way to make ACF use the fields from the latest post? Or can I force it to take the images from the actual taxonomy itself, rather than the posts in the taxonomy?

    Thanks!

  • Ok, so I didn’t figure out how to get the taxonomy to pull in the fields from the latest post but…

    I did figure out how to show the fields from the actual taxonomy (‘categoria’), rather than one of its posts:

    if (is_tax()) {
    	while( has_sub_field('imagens', 'categoria_'.$wp_query->queried_object->term_id) ):
    		//stuff
    	endwhile;
    } else {
    	while( has_sub_field('imagens') ):
    		//stuff						
    	endwhile;
    }

    Would still prefer for it to automatically grab from the latest post if anyone can offer an answer?

    Thanks!

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Taxonomy grabbing fields from posts, but in wrong order’ is closed to new replies.