Skip Navigation

[Resolved] Elementor and Content Templates in Header and Footer – renders full page content

This support ticket is created 6 years, 3 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 6 replies, has 2 voices.

Last updated by stuart 6 years, 3 months ago.

Assisted by: Nigel.

Author
Posts
#1111826

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

Thanks as ever guys.

Cheers
Stuart

#1112180

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screen Shot 2018-09-20 at 10.43.26.png

Hi Stuart

I can't see the links you shared, I don't have access.

I'm new to using Elementor for headers and footers.

I created an Elementor header using one of the provided examples.

I added a shortcode module to the header, and used it to insert a Content Template (which simply includes a couple of shot paragraphs).

That text from the Content Template shows in the preview, and when I save and publish, it also shows when visiting a page on the front end.

So, it appears to be working as expected.

What is different with your set up?

#1113958

Sorry for the delay - I got married 🙂

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.

Please feel free to further questions.

Kind regards,

--
Elementor Technical Support

#1114414

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screen Shot 2018-09-24 at 15.37.39.png

Hi Stuart

Congratulations 🙂

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?

#1114549
image 1.jpg

Hey Nigel - Thanks by the way.

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]

#1115006

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Stuart

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.

#1115460

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.