Skip Navigation

[Gelöst] How to use to show standard wordpress posts on a CPT-template , with same cat.

This support ticket is created vor 1 Jahr, 11 Monate. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 12 Antworten, has 2 Stimmen.

Last updated by jorg-andreasK vor 1 Jahr, 11 Monate.

Assisted by: Shane.

Author
Artikel
#2355459

Hi there from Germany,

I am building a Website with a CPT "Teams" for a local football club. I am also using Toolset and Elementor on "Hello Theme", latest WordPress.

Next to the Teams fields I want to show the related standard posts (listed) as Team NEWS on a teams single template.

How can I manage to show additionally the Posts on the Teams single by same Category? Meaning Team A should have the News of the Category for Team A.

Can´t realise it with Elementor, because the CPT Teams does not have any widget in Elementor Templates.

Is there a chance to build this with a View or template of toolset?

Al the best from Germany

Jörg

#2355519

Shane
Supporter

Languages: Englisch (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jorg,

Thank you for getting in touch.

If I understand correctly you essentially want to display Posts of the same category as the one that is currently being viewed. If so then you can do this with a view.

Go to Toolset -> Views and create a new view for that same post type and then add a query filter to that view for the specific taxonomy and then set the filter to get the value from the current page that the view is on.

Then just populate the view with the loop wizard with the additional info that you want that view to display. From there you can simply add your view to your elementor template.

Please let me know if this helps.
Thanks,
Shnae

#2356111

Hey Shane,

Thx for your soon reply.

Your Idea will work, no daubt. But the Page I want to integrate the Posts in is a template (single custom post)of my CPT Teams, which has a Category

So, if the category of the team ist "Junior Team A" It should publish the WP standard posts of the Category "Junior Team A".

I have 62 Teams, don´t want to create 62 Views and put it in manually

Is my description clear enough? Not easy to describe.

Jörg

#2356367

Shane
Supporter

Languages: Englisch (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2022-05-05 at 9.46.01 AM.png

Hi Jorg,

Then this is exactly what i'm describing that you should do with our Views plugin.

Adding the query filter to the view for the Category taxonomy and set it to filter for the same category of the page.

When the view is added to the page it will automatically display posts from that same category. See Screenshot

If you're having any issues setting up this please let me know.
Thanks,
Shane

#2361589

HI Shane,

before moving on pls let me understand the category function,... I only created categories for the standard posts,... not for the category of the cpt. Is it right to do so?

because i created a filter as you described, but the result ist that it seeems to be no filter, all posts were shown.

Jörg

#2361631

Shane
Supporter

Languages: Englisch (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jorge,

Perhaps it'll be easier if I had a look at your setup to see exactly what is wrong.

Would you mind allowing me to have admin access to the website so that I can have a more detailed look at this for you ?

Please where applicable please provide me with a link to an example page where I can see the issue.

I've enabled the private fields for your next response.

Thanks
,Shane

#2361633

Shane
Supporter

Languages: Englisch (English )

Timezone: America/Jamaica (GMT-05:00)

Private Fields

#2361791

Page is under developement, nothing is published yet.... no worries with testing

Jörg

#2361877

Shane
Supporter

Languages: Englisch (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jorg,

Based on what i'm seeing the correct information is being displayed.

If you take a look at the page you will see that i've output the taxonomy values for each post and they seem to be matching the page that its on.
hidden link
Thanks,
Shane

#2362225

Hi Shane,
thx for your reply.
Yes you are right, the view ist there, ...but to many posts. This Category has got only one post(!)

Where do the others come from and follow?

Jörg

#2362283

Hi Shane again,

additionally, why is the category shown before the h2 tag?

Jörg

#2362759

Shane
Supporter

Languages: Englisch (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jorg,

Only one post is now displaying in the view and it is the "Neue Trainingszeiten für unsere Jugendmannschaften in der neuen Saison
" post.

SO the correct data is indeed now showing.

additionally, why is the category shown before the h2 tag?

This was added by me for testing purposes to debug the view to see what data is being displayed.

Thanks,
Shane

#2364177

A small missunderstanding at the end, but no matter, I now know how to move one, thx Shane (!!!)

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.