Sauter la navigation

[Résolu] creating a View of WordPress posts in Elementor Template

This support ticket is created Il y a 1 année et 7 mois. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

Ce sujet contient 10 réponses, a 2 voix.

Dernière mise à jour par Minesh Il y a 1 année et 7 mois.

Assisté par: Minesh.

Auteur
Publications
#2611273

Hi there,

I am using a CPT for Teams (Elementor Template) and want to show the related WordPress posts with additional fields here at the bottom of this template.

I want to filter the posts by the related category the Team and the post have. It works... but want to createa new, a better Design without coding.

Pulling in a Views widget on the elementor template only allows me to use an existing view.

I can`t create a new one here. But if I choose to create it under Views of the toolset Menu item I don´t have the choice for Grids, lists, etc.

How can I create a loop without coding for this teams template? Can you help with an advice?

all the best from Germany

Jörg

#2611279

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

What you should try to do is, you should try to create a content template in block mode (do not assign this content template to any post type) build your block view using this content template and then later try to add shortcode or text module to your elementor's template and then add the content template as given under:

[wpv-post-body view_template="your-content-template-slug"]

Where:
- Replace "your-content-template-slug" with your original content template slug.

#2611283

Thx for your soon reply.

I am not sure about your answer,...

If you look at this url: lien caché - it is a single of my teams CPT.

On the bottom there is a loop (under Team News)of related WordPress Posts, filtered by matching the same category with an older, ugly design I want to replace. This one was done with the views editor and some code. My Idea was to replace this with a better design, I hopefully don´t need to code for..

Jörg

#2611287

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Its not like that you will not required code but you can test and check what you can build using view block.

As shared - you should create a new content template from: Toolset => Content Templates
- Then try to add a view block to it and build your view as required and save your content template once you finish with it
- Then add this content template using the text module so add a text module and add the content template shortcode to display the content template

For example:

[wpv-post-body view_template="your-content-template-slug"]

Where:
- Replace "your-content-template-slug" with your original content template slug.

Are you using block view? if no, then you can enable both block and legacy feature using the following setting:
- https://toolset.com/course-lesson/enabling-legacy-version-of-toolset-views/

As described with the above doc - you can chose the third option from editing experience section.

#2611475
screenshot_Toolset_views.png

Hi there again,...

actually , if I put a Views Widget in a template or side, I only can choose an existing view. No chance to create a new one in the blog editor!!!

Please have a look on my screenshot

Jörg

#2611489

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

It does not seem that you are using block view. you can enable both block and legacy feature using the following setting:
- https://toolset.com/course-lesson/enabling-legacy-version-of-toolset-views/

As described with the above doc - you can chose the third option from editing experience section.

Once you activate that once you add view block it will allow you to either create new view using block or select existing one.

#2611507

Hi there again,

Thx again,... found it, got it.

But how can I now use the template for wordpress standard Posts filtering by same category of the team and the posts? Elementor is not giving me the options, it has to come from the toolset View or Template?

but how?

Jörg

#2611529

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

You should create content template and inside the content template you should add the view block and to this view block's Content Selection tab on right sidebar you will see query filter section and with that query filter section you should try to add your taxonomy filter and select the option "Value set by the current page where this View is shown":

More info:
- https://toolset.com/documentation/legacy-features/views-plugin/filtering-views-by-taxonomy/

Then save your view and content template and add the content template shorcode as described with my previous reply to your elementor's template.

I hope you will find that.

#2611601

Thx for your Rply,....

Just to avoid a missunderstanding: you want me to create a n o t h e r content template?

I am a bit confused now

Jörg

#2611613
screenshot_Toolset_content_template_Tab.png

On my actual Content Template there its nothing to work on the query in the content template tab: there is no query filter section.

Do you want me to create a legacy template and put the previous created view blog in and use the filter possibilities of the legacy template?

Jörg

#2611651

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

You wanted to rebuild your view in block mode - right? If yes, so with this content template you created you can add the "view block" now and build your required view by adding blocks to it to the view block.

Please check how you can build view.
- https://toolset.com/course-lesson/creating-a-view/

Once you done creating your view's output for your view block then select the view block from the block navigation bar and on the right sidebar you will see the "Content Selection" tab under that tab you will be able to see the query filter section where you will have to add the query filter.