Ive chatted with Elementor Support and they have suggested I also chat with you guys.
To Elementor:
I have an issue with Elementor not rendering the "Content Template" shortcode within the shortcode element (from Toolset.com) when this is applied to either a Header or Footer Template in Elementor.
It renders the main content of the page again? "Content Area"
It, however, works if applied in a standard Elementor page template (not in the header or footer template) - renders and displays correctly and executes fine.
Examples of where it does and doesn't work - Videos
Here we go - Template version is the broken one when applied to a footer section globally hidden link
Working version - when applied to a standard page. hidden link
Here we are Nigel - I've made them public for the time being:
Here we go - Template version is the broken one when applied to a footer section globally hidden link
Working version - when applied to a standard page. hidden link
I hope they give you more info - if not Ill reply with more details.
-- Details from Elementor Support --
Hi Stuart,
Thanks for updates.
What those shortcodes, both Toolset shortcode and the one from Codecanyon, should output on the page? Maybe they are not supposed to be working in the Footer template because they will generate an extra content container?
It's a good question that should be investigated by both our developers and those plugin's developers. So from my side, I have created a bug report to our developers, it should be reviewed in the order it was added there. But I would advise you to contact the plugin's authors and ask them for a solution as well, as they most probably don't know regarding this issue and could be interested in fixing this on their side.
I'm trying to replicate the problem based on what I can see in the videos, but have been unable to.
Note the screenshot where I have a custom header and footer designed by Elementor, both of which contain an unassigned Views Content Template that contains a conditional shortcode testing a search parameter, which works as expected.
I'm just viewing the sample page on the front end, not a post (which has templates assigned) or a page designed in Elementor.
Is there something specific about the page where this is happening?
I have figured it out - there was a conflict with Generate Press Pro and and Elementor - when using conditionals in Toolset (and other plugins with conditionals).
You need to go in to GeneratePress Hooks (in the Appearance menu) - then disable wp_footer hook ad the wp_header hook placements.
This will then render the conditional correctly (but not in preview in the Header and Footer templates in elementor).
-- I Hope this helps someone - and Ill post this to the GeneratePress forum and the Elementor Pro forum.
-- This is what I was going to write so you can diagnose, test with this setup if you wish:
Elementor
Elementor Pro
Generate Press + Pro (There was a config conflict here)
Toolset
If you go to "Elementor" menu then "Templates"
Then "New" - then create a "Header" template.
Name it then edit it.
Once you have assigned your shortcode and conditional. Save it and preview.
This will preview the "Header" and you will notice a double content area - see image 1
this is what I've added in a shortcode element
[wpv-post-body view_template="test-content-template"]
it contains:
[wpv-conditional if="( '[wpv-search-term param="stu"]' ne '' )"]
Stu Query = [wpv-search-term param="stu"]
[/wpv-conditional]
[wpv-conditional if="( '[wpv-search-term param="stu"]' eq '' )"]
Stu query parameter is empty.
[/wpv-conditional]
I've passed this info on to our developer who is currently looking at using Toolset with Elementor's custom headers and footers.
Is the workaround you found—disabling the GeneratePress hooks in the settings—sufficient for you?
Our developer is looking into it, but it may not be something we can do anything about if it relates to how Elementor and GeneratePress work together.
If you want I can escalate this and create an internal ticket so that it can be formally dealt with, or if you are happy enough with your work around let me know and we can close this.
All good - I've passed on to Tom at Generate Press and it may be a small bug with how this works - but its led to another question I'll open in a separate thread.