Show featured post on top of all posts in archive

I am using Query Builder to show the “Featured” posts on an archive template. Its working.

BUT… the same post repeats in the general archive below. is there a way to exclude the posts marked as “featured” in the general archive?

see below, “Cinc

h” is featured but also repeats in the general archive.

Hello @uxmediahouse,

Thanks for writing to us.

I would suggest you please set the condition where you have set the Looper consumer. “Post(has term) has not featured”.

Please have a look at the screenshot below.

Hope it helps
Thanks

1 Like

Aha! perfect. Thanks

You are most welcome @uxmediahouse

awesome…I have a follow up question. We are using ACF taxonomies and have posts assigned to the taxonomies.

The “featured” section uses the “Query Builder” builder with the modification you suggested. Great!

The issue is that the “featured” posts show up on ALL taxonomies, not ONLY the taxonomies that they are assigned to. Is there a way to have the featured post, ie: CINCH show up as a featured item ONLY on the taxonomy it is assigned to? There will be multiple taxonomies that a single post may be assigned to. For CINCH those are “Employee Scheduling & Time Tracking, Janitorial Management Software, Software Solutions”
https://dayporter.com/business-type/software-solutions/

In the screenshot below “UX Media House” shows up as featured, but I would like it to ONLY show as featured in its respective taxonomies. “General Services, Sales & Marketing”
page link here:
https://dayporter.com/business-type/general-services/

I am sure I could figure this ot with a multiple templates for each main taxonomy, but I would really like to get this working with the one master template if i can

Hello Riceman,

You are using the Looper Provider Query Builder and this loop will return the same post items. If you want to display featured post in each of the archive taxonomy, you may need to create a different structure. Like this for example:

Looper Provider Query Builder with condition if index
   Looper Consumer
       Featured items

   Div - All Posts when on an archive taxonomy page
   Looper Consumer if Post has term featured
       Featured items

   Div - All Posts when on an archive taxonomy page
   Looper Consumer if Post does not have the term featured
       Featured items

Hope this helps.

1 Like

Aha! Thank you. I got it sorted out and its working on the front-end as expected. This is how I accomplished it if anyone else needs this feature (and please let me know if I missed something).

main structure:

Featured Posts Provider

Featured Posts Consumer:

General Archive Consumer:

Hey Riceman,

Thank you for sharing your idea, we really appreciate your time and effort.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.