I called a Toolset View (built using blocks editor) in an elementor page using shortcode, but i couldn't the have view layout in columns/grids like it was built. (it was changed to one column). I found in support forums someone previously had the same issue and tried the solution of creating a content template with a similarly constructed view.
Site structure is as such:
"Breeds" post type has 'one to many' post relationship to "The Pack"
Currently on "the Pack" single post, I call the content template with the following shortcode:
I am able to identify that id="[wpv-post-id item='@breed.parent']" returned a correct post-id,
but am still not achieving the desired result on the single page.
Is there any documentation that you are following?
Hello. Thank you for contacting the Toolset support.
Can you please share problem URL and admin access details and also mention what is your expected output and I will review your current setup and guide you in the right direction.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
Unfortunately - the admin access details you send to me is not working at this end. Can you please send me working admin access details.
Also, you want to list the dosts belongs to same breed and same birth-date based on the current post? or to what field we will require to compare the breed and birth-date?
I have set the next reply to private which means only you and I have access to it.
As with the view "Same Breed and Birthdate" on the following page the post type assigned to this view is "The Pack":
=> hidden link
Do you want to display dos posts or "the pack" posts and to what section as I can see you added multiple views to your Elementor single content template:
=> hidden link
I will require bit more accurate details about from what post type you want to display what and with what view and view is added to what section of your elementor template.
The view is working as intended. The problem with using the view is that the output is in one column even though it is constructed to have a few columns in blocks. the four columns now is achieved via elementor, and i cannot get them to align. (we can't really tell with one row, but it will become obvious if the view has enough results to make 2 or more rows) The present solution also shows text in four columns if no results are found. (see hidden link)
The following works, but the output is always one column - [wpv-view name="Same Breed and Birthdate" wpvrelatedto="[wpv-post-id item='@breed.parent']" birthdate="[types field='date-of-birth' output='raw'][/types]"]
That is why I am testing to use a content template so call the view. but in using a content template, I can only pass one argument (breed). I am looking for a solution to pass date of birth to the view in the content template, but have not found a workaround.
The following is what I am testing - [wpv-post-body id="[wpv-post-id item='@breed.parent']" view_template="#Siblings"]
as for these 2 lines -
id="[wpv-post-id item='@breed.parent']" - I had this line here to see wether I got the correct parent post.
birthdate="[types field='date-of-birth' output='raw'][/types]"] - I was trying to pass "date of birth" to a content template, but i can't.
I've setup the page (hidden link) to reflect the first problem i faced.
The View called by shortcode
[wpv-view name="Same Breed and Birthdate" wpvrelatedto="[wpv-post-id item='@breed.parent']" birthdate="[types field='date-of-birth' output='raw'][/types]"]
outputs the intended results, but the results are unformatted even though its loop style and grid settings are configured (please see the 2nd view at hidden link)
Is there anyway I can use block editor and achieve a formatted loopstyle and grid settings here?
==================
The above issue led me to attempt to use a content template so that the output is formatted correctly.
But in using a content template, I am only able to pass one variable (which is breed.parent). I need to pass a second variable like i did in Views above, so that I can run 2 filters in the View residing in the content template. How can I achieve this?
The output is as expected now.
I have tidied up the backend to call the view with parameters directly instead of through a content template.
I have also turned off the debug mode.
I just to verify that some view settings cannot be passed when a view is called via a shortcode with extra parameters? and because of this, you have employed CSS to specify the grid settings of the view.