Skip Navigation

[Resolved] Pull posts by taxonomy to page

This thread is resolved. Here is a description of the problem and solution.

Problem:

In single page, display related "space" posts by taxonomy "Location".

Solution:

You can try these:

https://toolset.com/forums/topic/pull-posts-by-taxonomy-to-page/#post-2372201

Relevant Documentation:

This support ticket is created 2 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by leilaG 2 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#2370201

We would like to pull through 4 posts from here - hidden link
To individual location pages like this one - hidden link

The 4 posts would be filter by taxonomy location to show the posts for that specific location page and ordered by hightest sq.ft
Do we need to create a CT for every location page?

Thanks

#2370419

Hello,

I assume we are talking about a custom taxonomy "Location", you don't need to create pages for each "Location" taxonomy term, you can use taxonomy archive page as term information page
https://toolset.com/glossary/archive/
and design it with Toolset WordPress Archive, see our document:
https://toolset.com/course-lesson/creating-a-custom-archive-page/

#2371819
4 space posts.png

Hi, I think you may have misunderstood.

We already have the location pages, we want to add 4 posts into the already created pages -

For example here are some of our locations pages -
hidden link
hidden link
hidden link

We want to add a row with 4 post that are tagged for that specific location page.

#2372201

I assume we are talking about below case:
1) Two post types
- WordPress built-in post type "Page"
- Custom post type "Space"
2) Custom taxonomy "Location"

In single page, you are going to display related "space" posts by taxonomy "Location".

If it is, you can try these:
1) Register "Location" to both post types:
- "Page"
- "Space"

2) Edit each page and "space" post, setup the term in taxonomy "Location"

3) In the single page, display a post view:
- Query "Space" posts
- Filter by:
Select posts with taxonomy:
Categories the same as the page where this View is shown
- In view's loop, display the "Space" post information

More help:
https://toolset.com/documentation/user-guides/views/filtering-views-by-taxonomy/
Value set by the current page where this View is shown

#2372633

My issue is resolved now. Thank you!