Hello, I am creating a view and have selected the Grid style but it does not change it on the front-end. Its stays as an ordered list.
I have 2 content templates that have views, one was duplicated and used for a different post type.
Now both post types are pulling through data from each other, and I am unsure why.
They are not assigned to anything, following instructions from here - https://toolset.com/forums/topic/avada-theme-and-builder/
hidden link
Content template - hidden link
hidden link
Content template - hidden link
Hi,
Thank you for contacting us and I'd be happy to assist.
I noticed that you've used separate content templates to create the views used on these pages. However, these views are shown on the pages using the view's shortcode and not through the content template shortcode, as Nigel recommended.
( ref: https://toolset.com/forums/topic/avada-theme-and-builder/#post-2292015 )
If you'll use the 'wpv-post-body' shortcode to load these content templates on those pages, the view's styles won't be lost.
Note: You won't be able to show view's search form and the search results in separate columns on the page if you'll load the content template as a whole. But, you can overcome this limitation, by editing the views so that the search form and the results are in two columns side-by-side:
https://toolset.com/course-lesson/creating-a-custom-search/#display-the-search-box-and-search-results-side-by-side
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
Hi Waqar, thanks for the info. I have fixed the shortcode and the grid layout, but the data is still being mixed up between the two content templates. How do I fix that?
Is there a setting that I am missing?
hidden link Is not pulling through the correct search filters from its content template.
hidden link
It's also not displaying in its columns and is pulling through data from another post type.
The same with the below -
hidden link
hidden link
Also when I change the loop style in one content template, it changes it in the other content template. How do I have a different loop style in each content template?
I've checked these pages and noticed that they are using separate content templates, but the view used on both these templates is the same view named "Companies".
You can keep this view for the template "companies", but in the template 'jobs' you can remove the current view block and instead add a new view block and create a new view named 'Jobs'.
This way you'll be able to control the loop and design on both pages, independently.
Okay, I am seeing this error message when I try to create a new view 'Jobs:
Another View (Companies) already uses this slug. Please use another name.
Where can I edit the view name and slug?
'Jobs' was the original template that I duplicated to make 'Companies'
Does this mean if I want to copy a content template, and create something similar for another post type I need to create the view block from scratch?
When working with the blocks based views, you can change their name but not the slugs.
( example screenshot for the view's name field: hidden link )
To avoid confusion and overlapping, you can use descriptive names for the views and content templates, for example:
Content templates:
( example screenshot for the content template's name field: hidden link )
- CT for Jobs Page
- CT for Companies Page
Views:
- View for Jobs Page
- View for Companies Page
Your understanding is correct and if you copy a content template, but want to show a different post type through the view, then a new view will need to be created from the scratch.
Okay thanks for the explanation.
How do I delete views?
I noticed if I select an existing view it gives me the option to edit a copy of it. So is that the way to copy a view and use it for a different post type? and where can you edit which post type is being used?
Please go to WP Admin -> Toolset -> Settings -> General and for the "Editing experience" select "Show both the legacy and Blocks interface and let me choose which to use for each item I build".
After that, the "Views" menu option will become available at WP Admin -> Toolset -> Views.
From this management screen, you'll be able to see all the available views and delete the ones that are no longer needed.
After creating the copy of a view, you can change the selected post type from the view's "Content Selection" settings.
( screenshot: hidden link )
My issue is resolved now. Thank you!