Tell us what you are trying to do?
Insert a toolset view into a page built with elementor using shortcode
When I enter the short code [wpv-view name="view-name"], and view the page built with elementor, it changes the view layout from three columns to one. I am not sure if I am using the correct shortcode.
Is there any documentation that you are following?
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#displaying-content
What is the link to your site?
This is the page (the view is under Featured Towns heading):
hidden link
This is the page where I originally built the view to test it and setup the layout:
hidden link
Hello and thank you for contacting the Toolset support.
From what I can gather so far, the view was built using the blocks editor, and then you are including it in an Elementor page using a shortcode. If we analyze the page where the view was built, we can see that the block editor adds some styling that makes the 3 columns grid work, check this screenshot hidden link
I'll suggest the following:
- Create a content template and create a similar view inside of it, using the blocks editor. The template should not be assigned to any custom post type or archive.
- Include the content template inside your Elementor page using a shortcode:
[wpv-post-body view_template="name or slug of the content template"]
If this does not work either, let me know and I'll check this with our developers. In that case, I'll need you to include the debug information to have more information about your setup.
- https://toolset.com/faq/provide-debug-information-faster-support/
Ok, I will try this, thank you for your assistance. Will reply again after I try!
Awesome, I'll set this ticket as waiting for your feedback. It should be kept open for 3 weeks and you will receive automatic notifications before closure.
Hi Jamal,
So your solution worked for me to insert the view, for sure, but it created two follow up layout challenges.
1. One is that the image block in the view will not center. I have the block alignment settings to center, and do not see any other options or settings for centering the image. It is centered in the template editor (screenshot attached)
Here's the page where the alignment of that image goes off from the block setting:
hidden link
2. Can I set up the view to have 3 columns like I did on the one created in the blocks editor?
Thanks!
The image is not centered because of some Elementor styles. Check this screenshot hidden link
I wonder if using a content template, as I suggested before, did work?
Can you allow me temporary access to your website and let me check this further? Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
I added a custom class to the image block to target it with custom CSS, check this screenshot hidden link
Then I added the following CSS code to the view, check this screenshot hidden link
.force-center {
margin-left: auto !important;
margin-right: auto !important;
}
As you can see this fixes the alignment of the image hidden link
Thank you, Jamal!
My last question on this issue is, is it possible to set up a view to have columns in the content template like I was able to do when I created a view in a page? The loop output settings for columns is not there when creating the view on the content template.
The View Block has some children's blocks. The loop style is defined on the "View loop" child block. Choose it from the block navigation then change the loop style in the right sidebar. Check this screenshot hidden link
I already changed it for this view, and it gives the desired results hidden link
My issue is resolved now. Thank you!