-
AuthorPosts
-
August 17, 2023 at 1:42 am #1416440
Hey, I have some new information on this (per my previous post #1415389 https://tinyurl.com/284ddper ) — I’m hoping I can convince you to help me solve this issue where my Enfold header disappears if I activate an Elementor Footer. Elementor support said it might have to do with the fact that the header div is closed in the footer. Sounds like, if I could just get the closing div out of the footer, I could use Elementor’s footer without losing my beloved Enfold headers. Any chance you could steer me in the right direction for that kind of modification? I already have a child theme in place, and I’ve copied the site url, a screencast showing the issue, and a temp login link in the private content. Thanks so much and lmk if you have any questions!
August 18, 2023 at 4:10 am #1416528Hey sky19er,
Thank you for the inquiry.
Sounds like, if I could just get the closing div out of the footer,
We’re not really sure how that would resolve the issue, but it’s worth noting that the closing tag of the header is located in the enfold/includes/helper-main-menu.php file, specifically at the very bottom of it around line 368.
<!-- end header --> </header>
If you need to modify the footer, it could be worthwhile to check the footer.php file.
Best regards,
IsmaelAugust 18, 2023 at 8:28 am #1416533Thanks, Ismael, but I’m sorry, I misread what they (Elementor support) said and therefore described it wrong to you. They said “[Enfold] opens several div tags in the header template and then closes them in the footer template.” — plus, I missed that they had actually included screenshots (linked below) — does that make more sense, now? Thanks again and lmk if you have any other questions.
header opening tags: https://capture.dropbox.com/oYrHiQf977skxIW4
footer closing tags: https://capture.dropbox.com/Dp4mXtmqwdaJ4JnLAugust 19, 2023 at 8:35 pm #1416652Hi,
When I check the footer.php the closing brackets that you are pointing to, #main & #wrap_all close before the WordPress footer function that I assume that Elementor is hooking in to:
Best regards,
MikeAugust 22, 2023 at 7:21 am #1416833Thanks so much, Mike — sorry I didn’t catch that — I’ll bounce that back to Elementor support and let you know here what they say, either way, if you don’t mind keeping this open.
August 22, 2023 at 12:02 pm #1416849August 22, 2023 at 7:13 pm #1416881Thanks, Mike — here’s what they said:
Please note that Elementor doesn’t just hook to WordPress functions. It declares its own theme locations and replaces the theme header.php and footer.php files. For reference: https://developers.elementor.com/docs/themes/ Therefore, this is still valid feedback from my side: https://elementor.com/help/considerations-for-theme-builder-compatibility/
Do you think that leaves me any hope for a workaround? Thanks again.
August 22, 2023 at 11:48 pm #1416889Hi,
Thanks for the feedback, it sounds like the closing tags for #main & #wrap_all will need to be added to:
single.php
page.php
archive.php
so the footer.php can be replaced by Elementor.
Give this a try and only leave the closing /body & /html in the footer file as a test.
If this works for you you can add those files to your child theme.Best regards,
MikeAugust 23, 2023 at 12:52 am #1416895Thanks, Mike! Can you tell me how often you’d guess I’ll have to update those files, due to theme updates? I mean, you don’t think it will be impractical in that respect?
August 23, 2023 at 1:23 am #1416898Hi,
I don’t think those files will change often but if you notice any issues you want to check those first, but the footer.php may be more often so you will want to check it with each update.
We don’t recommend a child theme footer.php & header.php anymore in to your child theme, it is the most common reason for errors when updating. We recommend adding any customizations added in your child theme functions.php, but in this case you will need a custom footer.php because you don’t want the closing tags for #main & #wrap_all added twice.Best regards,
MikeAugust 23, 2023 at 8:35 am #1416918OK, thanks so much — but it sounded to me like they said Elementor would replace the footer.php — “Please note that Elementor doesn’t just hook to WordPress functions. It declares its own theme locations and replaces the theme header.php and footer.php files.” — doesn’t that mean, as long as I’m using the Elementor footer, I don’t need to worry about the Enfold footer.php?
August 23, 2023 at 11:56 am #1416943August 24, 2023 at 1:48 am #1417007OK, so, I should be able to test this with just the page.php file, if I’m only looking at “regular” pages (eg https://gatcomdev.wpengine.com/about/), right? If so, I added the closing divs to the page.php file and it doesn’t seem to do the trick. In my testing it seemed like I had to remove the echo, like this: https://capture.dropbox.com/RmIFvQzocT49oUt0 — does that look right?
When looking at the source after adding those closing divs to the page.php file, I can’t find those new closing divs — I’m guessing maybe because I’m using Elementor to build the pages. If I add the closing divs to the header.php file and view the source, I can see them (https://capture.dropbox.com/hMUlWN8NYgc6dzpQ), but they still don’t seem to make a difference — when I turn on the Elementor footer the Enfold header still disappears — so I put them back in page.php, per your instructions, for now.
Any other ideas for me? Thanks again.
August 24, 2023 at 5:56 pm #1417078Hi,
You can’t add the closing div’s to the header.php because thay are needed for the page content, try adding the footer.php content to the bottom of the page.php and see if that works with the Elementor footer enabled, if the Enfold header and the Elementor footer shows with the Enfold footer just above it, then that would be a good start.
Then you can remove the Enfold footer functions from the code you added to the page.php, try removing the functions and not the closing div’s until the Enfold footer doesn’t show.Best regards,
MikeAugust 29, 2023 at 4:28 am #1417369OK, I moved the closing divs back to the bottom of page.php (Is this the correct way to close those divs? https://capture.dropbox.com/ROwRW1tjKO7zxuXA ), added all the code from footer.php below that (I assume I’m supposed to remove the get_footer function, correct?), and removed the closing divs from that footer code. Does that all look/sound correct? It doesn’t seem to work — the header and footer both disappear as soon as I activate the Elementor footer. I’m including the info again in the private content, in case you have any other ideas for me :). Thanks again.
August 31, 2023 at 5:48 pm #1417714Hi,
Thank you for your patience, but I can’t test on my test site because the Elementor footer option seems to only available in the pro plugin.
The login you provided doesn’t work, but I’m not sure it it would be good to test though the WordPress file editor if it did work because any error may crash the site and lose access to the WordPress file editor, FTP would be better.Best regards,
MikeSeptember 1, 2023 at 12:56 am #1417732Thank you for the follow-through, Mike! Sorry about that link expiring — I’ve updated/extended it and repasted it in private content along with sftp info for that dev site — feel free to mess with that site all you want, I’m not worried about losing anything there. Thanks again and lmk if you have any other questions.
September 3, 2023 at 10:08 pm #1417987September 4, 2023 at 12:38 am #1417994Hmm, you sure? I just tried it in multiple browsers, private windows, etc. — seems to be working, no? Oh, I guess you’re referring to the sftp info? But that seems to be working, too — I can’t reveal the pw in filezilla, but I just double-checked it with the pw I gave you and it seems to be working — here’s a screenshot, in case that helps: https://capture.dropbox.com/xpPsJaSF5AWS4lnY — lmk if you’re still having trouble.
September 4, 2023 at 5:27 pm #1418089Hi,
Sorry, what I meant was that I can’t get the header to show when the elementor footer is enabled.
The SFTP & site login worked fine for me.
I tried modifing the page.php with footer.php content like you had but I couldn’t get it to work, I don’t know why.Best regards,
MikeSeptember 4, 2023 at 11:48 pm #1418110Ah, ok, well, thanks for trying — is there anyone else you can run it by? Maybe Ismael could take a look? :)
September 5, 2023 at 6:35 pm #1418193Hi,
I asked the rest of the team for advise, please leave the staging site available since this is a little out of our scope and we are quite busy in the support forum right now it may be a little while before they have some free time to look. Thank you for your patience and understanding and using Enfold.Best regards,
MikeSeptember 5, 2023 at 8:39 pm #1418198Great — thanks so much, Mike (and the team)!!
September 6, 2023 at 7:52 am #1418243Hi!
Thank you for your patience.
It appears that once you activate the Theme Builder templates, the plugin automatically replaces the header.php and footer.php files. This means that you won’t be able to display the default theme header, and you have to use the Header template within the Theme Builder panel. Editing the default template files from the theme won’t help in this scenario. Unfortunately, we couldn’t find any options to retain the theme’s header.php file, as the plugin automatically overrides both the header and footer when a template is chosen in the Theme Builder.
Regards,
IsmaelSeptember 6, 2023 at 8:01 am #1418244No prob — thanks so much, Ismael — makes sense. Seems like a long-shot, but any chance I might be able to add a snippet in the Theme Builder header template that would call/get the Enfold header or code? Thanks again.
September 7, 2023 at 7:28 am #1418333Hi,
If you can edit the header template file from the plugin, you might be able to use the get_header function to call the default header from the theme. You may need to create another file and copy the content of the default header.php template from the theme and rename it.
// https://developer.wordpress.org/reference/functions/get_header/
Best regards,
IsmaelSeptember 20, 2023 at 12:47 am #1419631Thanks, Ismael. Looks/sounds a little over my head — unfortunately I still don’t actually *know* php. But I think I found a workaround: I can save my Elementor footer section as an Elementor “template”. The problem is, updates to those “templates” don’t apply to every page containing the template — Elementor wants you to use the Theme Builder to do something like that — and if I use the Theme Builder to create the footer, it cancels out the Enfold header (the reason for this ticket). BUT Elementor does provide shortcode for those “Saved Templates” (see https://capture.dropbox.com/N8yakpTKi7pSjcLE ), so if I just save my Elementor footer section as a template and drop the shortcode in at the bottom of every page, then, when I make a change to my footer via the Saved Templates, it applies to every page containing the shortcode. So then I have my goal: Enfold headers with Elementor footers (updatable from one file)!
Thanks so much for sticking with me on this — I think exhausting the possibility of using Elementor’s Theme Builder to handle the footers helped/forced me to look at the problem from a new angle and discover this workaround.
- This reply was modified 1 year, 2 months ago by sky19er.
September 20, 2023 at 12:12 pm #1419696Hi,
Glad to hear that you have this sorted out, and thanks for sharing your solution, perhaps other users will find this helpful. If you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘enfold header with elementor footer’ is closed to new replies.