Skip Navigation

[Resolved] How do I copy a view with a search to another page so I can use the same layout?

This support ticket is created 2 years, 7 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 – 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 9 replies, has 2 voices.

Last updated by nicoleR-3 2 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#2158039

Tell us what you are trying to do?
I want to be able to use the same search/view layout on different pages without having to recreate the layout each time with the block editor (which is really a pain because the block editor is a terrible interface and extremely time consuming to use). I tried to duplicate the page, but then when I changed the info on one page it changed it on all, and while I could assign the overall view to a different custom post type, the view loop stayed with the original post type. But it was all futile anyway because of the changing the info on the original page anyway. I also tried making a reusable block of the search criteria but everything was showing up as shortcodes on the front end.

Surely there must be a more efficient way to copy a layout across different pages and change which custom post type is assigned to it.

Is there any documentation that you are following?
Searched and followed the instructions on a few other support threads but they didn't really help.

Is there a similar example that we can see?

What is the link to your site?
dressageconnec.wpengine.com

#2158513

Shane
Supporter

Languages: English (English )

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

Hi Nicole,

Thank you for getting in touch.

Are you referring to just duplicating the View that is on the page or are your duplicating the entire page itself.

If you're referring to just duplicating the view, all that you need to do is when you create your new page, just add the block view to that new page and set it to "Edit as copy" rather than editing the original. Once you've done this it will automatically create a copy of the original view that you can change an edit without affecting the original view.

Please let me know .

Thanks,
Shane

#2158633

Hi Shane,

I want to take the layout of the view on this page: hidden link

And duplicate it to this page: hidden link

And then be able to change the search criteria and the view loop to correspond to "Stallions" instead of "Trainers".

I have not been able to find anything that says "Edit as copy" when trying to add the block view to a new page.

#2158841

Shane
Supporter

Languages: English (English )

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

Hi Nicole,

Would you mind allowing me to have admin access to the site so that I can see what is happening here?

If your view was originally created with the gutenburg editor, when you add it to a new page it should ask if you want to edit the original or edit it as a copy.

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

Thanks,
Shane

#2159877

Shane
Supporter

Languages: English (English )

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

Hi Nicole,

I've added the view copy to the page below.
hidden link

You should now be able to edit it without any issues.

Thanks,
Shane

#2161283

Thanks for doing that, but I'm still having problems connecting it to the new post type. I went to View > Content Selection and click the radio button for "Stallions". But when I try to change some of the information in the View loop I am not getting "Stallions" as an option to choose from - for instance, when I want to change the featured image and try to use "Dynamic Source". I am only getting "Current Post" or "Other Post".

#2162205

Shane
Supporter

Languages: English (English )

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

Hi Nicole,

I suspect the issue is with the distance filter prefiltering the list on the backend.

The issue should now be resolved as i've removed the distance query filter from the view so Zhivago should now be showing up for you to customize the output of the view data.

Please let me know if everything is ok now.

Thanks,
Shane

#2162399

Thanks Shane. Can I ask what steps you took to get the view to copy correctly without affecting the original trainers page? Because I am going to need to go through this process again with another page.

#2162409

Shane
Supporter

Languages: English (English )

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

Hi Nicole,

All I did in your case to copy the view is to just open the new page and use the view block to insert the existing view.

When you're inserting the view it will ask if you want to edit the original or edit as a copy. Clicking on edit as copy and this should copy the view onto the page for you.

Thanks,
Shane

#2163853

My issue is resolved now. Thank you!

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