Skip Navigation

[Resolved] Can't have two different views on the same page

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 – 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 8 months, 4 weeks ago.

Assisted by: Waqar.

Author
Posts
#2682703

I'm creating a user account page that shows views of two different post types - businesses and offers. For some reason, when I set one to the correct content (post type), the other one is changed to match it. Take a look at hidden link.
You can log in as me - john@horning. The site is not live.

Under "My Business", you should see "Local Leader" and under "My Offers", you should see "Test Offer" and "Test Birthday Offer"
Thanks.

#2682808

Hi,

I've checked the page and noticed that both view blocks under these headings are using the same view named 'My business'. This is why making changes in one, updates the other, as well.

You can remove the view block from under 'My Offers' and add a new one, that creates a new view and not uses the existing one.

regards,
Waqar

#2683034

I duplicated the "My Businesses" view and then renamed the second one to "My Offers", and changed the content to "Offers". But both views are still showing the same content. Isn't that a bug?

#2683186
view-block-2.png
view-block-1.png

If you check the names used in both the view blocks on the page, you'll see that they're both using the 'My Offers' view.
( screenshots attached )

Also, at WP Admin -> Toolset -> Views, you'll only find this 'My Offers' view that is created using the blocks editor.

It seems you've duplicated the view block, which doesn't create a duplicate of the view itself. That will only make another copy of a view block that is referencing the same view as the original.

To properly create an independent duplicate of the view, you can insert a new 'View' block and then select the same view as the existing view. Once inserted, you'll be asked to either edit the original or edit a copy. You'll select the edit a copy option and its copy will be created, which can be edited independently.

#2683280
view.png

Thanks for the info. I added a new view block and set it up.

Typically, when you duplicate something like a page, the new page is independent of the original. If I understand correctly, that is not the case when duplicating a View block. This is confusing and not intuitive, and I see no reason to even allow duplication.

When I created a new view, I didn't see options to "edit the original or edit a copy" (as you say). I only saw "Create a new view" and "Use existing view" (see image).

#2683418
screenshot-2.png
screenshot-1.png

Thanks for the update. I see the two independent views working on the page, now.

> Typically, when you duplicate something like a page, the new page is independent of the original. If I understand correctly, that is not the case when duplicating a View block. This is confusing and not intuitive, and I see no reason to even allow duplication.

- I can see how this can be confusing, considering how the block duplicate feature works for regular blocks.

But, a view block is unique since it calls a separate entity a 'view' inside it. In this scope, it makes sense how duplicating the block and duplicating the view, works differently.

> When I created a new view, I didn't see options to "edit the original or edit a copy" (as you say). I only saw "Create a new view" and "Use existing view"

- Yes, from the options shown in your screenshot, you'll insert the existing view first.
( screenshot-1 )

Next, once the view has been inserted, you'll see the option to make its copy, while hovering over it.
( screenshot-2 )

#2683445

Okay I see now.