Viewing 28 posts - 1 through 28 (of 28 total)
  • Author
    Posts
  • #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!

    #1416528

    Hey 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,
    Ismael

    #1416533

    Thanks, 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/Dp4mXtmqwdaJ4JnL

    #1416652

    Hi,
    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:
    Enfold_Support_2997.jpeg

    Best regards,
    Mike

    #1416833

    Thanks 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.

    #1416849

    Hi,
    We will leave this open to hear back from you.

    Best regards,
    Mike

    #1416881

    Thanks, 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.

    #1416889

    Hi,
    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,
    Mike

    #1416895

    Thanks, 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?

    #1416898

    Hi,
    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,
    Mike

    #1416918

    OK, 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?

    #1416943

    Hi,
    I guess that makes sense.

    Best regards,
    Mike

    #1417007

    OK, 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.

    #1417078

    Hi,
    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,
    Mike

    #1417369

    OK, 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.

    #1417714

    Hi,
    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,
    Mike

    #1417732

    Thank 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.

    #1417987

    Hi,
    Thanks for the login, but I couldn’t get it to work.

    Best regards,
    Mike

    #1417994

    Hmm, 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.

    #1418089

    Hi,
    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,
    Mike

    #1418110

    Ah, ok, well, thanks for trying — is there anyone else you can run it by? Maybe Ismael could take a look? :)

    #1418193

    Hi,
    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,
    Mike

    #1418198

    Great — thanks so much, Mike (and the team)!!

    #1418243

    Hi!

    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,
    Ismael

    #1418244

    No 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.

    #1418333

    Hi,

    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,
    Ismael

    #1419631

    Thanks, 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, 3 months ago by sky19er.
    #1419696

    Hi,
    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

Viewing 28 posts - 1 through 28 (of 28 total)
  • The topic ‘enfold header with elementor footer’ is closed to new replies.