Skip Navigation

[Resolved] I can't display a single custom post on a website using elementor

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

Last updated by Adrian 5 years, 1 month ago.

Assisted by: Shane.

Author
Posts
#1202947

I created a custom post template. I created a new single page for elementor.
Everything works fine when editing the single template in elementor (adding the content block displays the custom post template as I would expect it), but when I try to actually access a single post on the front page, it only shows the header and footer and nothing else.

#1202948

I have verified that if I select Content Template as "none" the Elementor template works.
Flushing permalinks, disabling cache etc did not help.

#1203252

Shane
Supporter

Languages: English (English )

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

Hi Adrian,

Thank you for contacting our support forum.

I would suspect that this is the case. It is because there are incompatibilities with Elementor and Toolset.

So what you need to do when working with Elementor and toolset is to creat the templates using Elementor and then add toolset elements to that elementor template.

I would recommend going through the document here on how to work with Toolset and Elementor.
https://toolset.com/documentation/user-guides/using-toolset-with-elementor-page-builder/

Thanks,
Shane

#1203345

Yea, it's the exact case noted under the limitation.
This, however, means I can't use either way of displaying a post properly.

Because if I use the toolset content template, I can't make the rest of the page look ok and just plop the Elementor post content block where I'd want toolset to load its thing. I also need conditional statements which I can't add outside of toolset. I also need to add stuff like `<img src="/wp-content/uploads/sites/26/2019/02/[types field='profile-image'][/types].png">` to name a few.

And if I use shortcode blocks, within the Elementor builder, they also don't display correctly, as the html code they generate is not valid (they leave open tags, and screw up everything being displayed after them.
Toolset has a very PHP-like way of displaying things on the front end which is really useful, but if it isn't compatible with anything (issues with Divi, issues with Elementor) and it seems that everything I try is an exception that is not supported, then what is the point.

I am not trying to do something outrageous here. I am inserting the "page/post content" within a single page template, which is a very basic way to do things. The fact that this does not work is clearly a bug, not a "limitation". This is a premium plugin after all, not some abandoned freeware found in some corner of the WordPress plugins repository, as such I expect it to actually work.

Is there a way to submit a "feature request" or more appropriately a bug report and to track its progress, so I can be notified when it has been addressed?

#1203409

Shane
Supporter

Languages: English (English )

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

Hi Adrian,

You can suggest a feature request here
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

However I cant see why this doesn't work outside of our views plugin. The format below that you have is still supported under the wordpress API so it should work.

<img src="<em><u>hidden link</u></em> field='profile-image'][/types].png">

Secondly you made mention that the conditional shortcodes don't work when used in elementor. I'm not aware of any issues where you are bounded to use our conditional shortcode within views.

As long as views is active you should be able to use the conditionals.

Instead of using shortcode blocks what you can do is use the HTML blocks that elementor provides and add the shortcodes to them. This should work just as well.

As you can expect each of these builders are built by different Development teams, each with their own ideas so it wouldn't be strange or unacceptable if there are compatibility issues. The most we can do is address the issues that are on our side such as when divi elements didn't render our shortcodes.

But we cannot expect a full 100% compatibility.

Please let me know if this helps and if there is something specific with Elementor and toolset that you want me to assist with.

Thanks,
Shane

#1203419

Views work amazingly. The issue occurs when I am trying to display a single item.
From what I gather there is no way to create a view that displays one field, which I can then embed onto a single custom post.

There used to be a way to create a view that displays 1 item, then set a filter by ID and select the ID of the page the view is currently shown on.
Now the only thing I can do with ID filtering is to pass the value via shortcode attribute. But using `[wpv-view name="view-name" ids="[wpv-post-id]"]` hasn't worked in a while.

And I do expect full compatibility. I am not asking for full support using some low budget third-party plugin. I have an expectation that two of the leading plugins for WordPress, claiming to be the best at what they do, to be compatible. I agree that compatibility issues may arise, but not with main functionality, such as being able to display the single content template, which is 50% of the functionality of Views.

My problem is the fact that what Toolset sees as a solution is telling customers it is not possible, instead of working on a solution to resolve the problem, and deliver on the product they sold me and my clients on.

#1203834

Shane
Supporter

Languages: English (English )

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

Hi Adrian,

"From what I gather there is no way to create a view that displays one field, which I can then embed onto a single custom post."

This is actually not correct. You actually can. To limit the view to display one item you will need to add a query filter for the Post ID to the view. Then set the query filter to filter for the current page ID.

As you mentioned it worked previously but this actually still works. If you could allow me to go through the page that you are having this issue on maybe I can find what is wrong .

Perhaps its the way the questions are posted that would lead a to a "not possible" response. What you can do is to let me know what you want to achieve and provide the credentials to the page where the work has been started so it can be used as an example.

The private fields have been enabled for your next response.

Thanks,
Shane

#1213722

Shane
Supporter

Languages: English (English )

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

Hi Adrian,

The breaking of the shortcode with the additional "]" at the end is caused by the elementor shortcodes widget.

Secondly, the view should be working now as it is displaying the conditionals correctly for a single post of the persona CPT.

Perhaps i'm still not understanding clearly but i'm under the impressions that you want to use views to display the custom fields of the current page that it is on.

Thanks,
Shane

#1213829

Correct. I want to build a more advanced layout. I know I could do this via a content template, but that requires me to not load elementor at all. Re-coding the grid, etc and manually trying to create the layout in HTML and CSS using views is not practical.
So I need a way to display and conditionally display fields. inside the elementor single persona view.

Also the extra closing bracket is a Toolset bug. I can replicate it on websites not using elementor. it appears whenever I use[wpv-post-id] as a parameter for a shortcode. [wpv-view name="employees-display" ids="[wpv-post-id]"].

#1214224

Shane
Supporter

Languages: English (English )

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

Hi Adrian,

I'm not able to replicate the issue as i've tested on a fresh install with [wpv-view name="list-event" ids='[wpv-post-id]']

I only notice that the issue occurs on your site when using the elementor shortcode block. Using the Text Editor block renders the code fine.

Also the code should be working and filtering correctly on you site.

Thanks,
Shane

#1214232

using shortcodes in the text editor will sometimes severely mess up html code rendered by the shortcode.

What I found to work was:

1. Add a shortcode block
2. Set the content to dynamic and select post ID. Now the shortcode block displays the post/page id.
3. Click on the settings icon that shows up next to the "ID" field.
4. In the before field type in the first part of the shortcode:

[wpv-view name="employees-display" ids="[

5. In the after field, type in

]"] 

leave the fallback empty.

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