Skip Navigation

[Resolved] Duplicate View or Copy View

This support ticket is created 3 years, 10 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/Karachi (GMT+05:00)

This topic contains 5 replies, has 2 voices.

Last updated by Waqar 3 years, 10 months ago.

Assisted by: Waqar.

Author
Posts
#1956495

Tell us what you are trying to do?
I have created a view with single Post and Filter (Texonomies) option and I need to create same views based on different Texonomies. So can you give me and idea how easly I can duplicate the styple or can make it reuseble . I am using duplicate (Plugin) in order to create a duplicate view but it don't create a new view ... it use the same old view.. I hope you got my point if not let me know will try to explain again.

Is there any documentation that you are following?

not yet

Is there a similar example that we can see?

no
What is the link to your site?

hidden link

#1957875
taxonomy-filter-example.png

Hi,

Thank you for contacting us and I'd be happy to assist.

In your view block's settings, you'll see the option to add a query filter, under "Content Selection".

Using that, you can add a taxonomy filter, so that the results are filtered by the term, whose slug is provided through shortcode attribute, for example, "wpvcategory".
( screenshot attached )

This way your view will become re-usable and on different pages, you can insert this view, in a "Fields and Text" block using the view's shortcode with a different term slugs, passed as a shortcode attribute.
( ref: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-view )

For example:


[wpv-view name="View name" wpvcategory="term-a"]

You'll replace the "View name" with your actual view's name and "term-a" with the slug of your target term to filter the results by.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1961675

Hi Waqar,

thanks it is working but strange is that View Loop Style get change... in Main Template I am using Grid as Loop Style where as in short code it shows unformated loop Style can you just help me out with that ..

#1962343

Thanks for the update and glad that it worked.

Can you please share temporary admin login details so that I can see how this view and its styles are set up? Also share some links to the pages where this view can be seen on the front-end.

Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.

#1966007

So any update? still waiting for your response.

#1966269

Thank you for waiting and I apologize for the delay in getting back on this.

I've performed some tests on my website with a similar view and here is what I'll recommend.

On your new pages where you'd like to show the repeated instance of the view with a different term filter, you'll remove the "Fields and Text" block which contains the view's shortcode.

In its place, you'll add a "Views" block and select the existing view to show through this block. In that block's settings, you'll see a field to pass on the taxonomy term's slug to filter the view by.
( example screenshot: hidden link )

As a result, this page will show only those posts which are related to the term whose slug is passed in the view's settings and the styles won't be lost either.

On other pages, you'll just change the slug of the term to show results filtered by other terms.