Display relevant posts within looped categories

Hi,

I want to set up a looper to show all post categories in columns and within the category columns it displays the relevant posts for each category.

Setup information below:

I’ve got a CPT set up for ‘contributors’. I have a taxonomy set up within Contributors for ‘Industry’. Within Industry there are several categories.

Each Contributor (within the Contributors CPT) has a different category assigned to them, or may have multiple categories asigned to them.

I have created a looper provider on the row and set it to ‘All Terms’, and I set up a consumer in the column within the row. Within the column I used a text element for ‘Term Name’. This successfully outputs all the ‘Industry’ categories in columns.

Now within each industry column I would like to display a list of posts from the relevant category.

Whenever I put a new provider within the column and set it to ‘Query Builder’ with Post Type set to ‘Contributors’ it just gives me all the Contributors and not just the ones in the relevant category.

You can see an example here: https://eco.spiralorbdesigns.com.au/expert-coaching/

Each box has a dynamic term heading (the industry), and within I would like to display all ‘posts’ that have that industry as a category.

Hopefully this makes sense! Happy to provide login details if needed.

Cheers,
David

Hi David,

Thanks for reaching out.
It seems that you are trying to show the specific posts based on the Categories. If that is the case, I would suggest you go through the following thread which explains the same for the Posts only.

You need to change the post type to post_type=contributors into the Query String and it looks like the following.

category_name={{dc:term:name}}&post_type=contributors&posts_per_page=3&offset=0&ignore_sticky_posts=1&post__not_in%5B0%5D={{dc:post:id}}

Note: The given URL is required login to see the content.

Hope it helps.
Thanks

Hi @tristup,

Thanks for the detailed response. I have tried implementing your solution going step by step, but it is still not pulling through the post information within each category block.

I’ve removed the condition requiring you to log in: https://eco.spiralorbdesigns.com.au/expert-coaching/

Your solution is first, then how it is supposed to look is below the red line on the page, which was done manually rather than dynamically.

I’ll attach a secure note with my login details so you can see. Thanks so much for your support!!

Cheers,
David

Hi David,

I have checked and found that your taxonomy name is industry, so you need to specify the industry in place of category in the Query String and the string will look like the following.

industry={{dc:term:name}}&post_type=contributors&posts_per_page=3&offset=0&ignore_sticky_posts=1&post__not_in%5B0%5D={{dc:post:id}}

I went ahead and created a test page and implemented this, please find the URL of the page below:

https://eco.spiralorbdesigns.com.au/test-by-themeco/

Thanks

Thank you so much @tristup!

I am continually blown away by the high level of support you provide.

Cheers,
David

Hello David,

Glad that we were able to help you. Please feel free to reach us if you have any queries regarding our theme and theme settings.

Thanks

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