My Elementor header and footer not used by WP
-
Hello
I’m creating a site where I’m using Elementor Pro. I have created a custom header and footer in the Theme Builder template that works as expected – it even overrides the header and footer from the theme we are using (BulkPRO from Theme4Wp). Display condition is set to entire site for both.
I have created several single pages that will only be available to logged in members and to protect those from not logged in guests, I’m using Simple Membership Plugin (SMP). This is also working as expected.
The problems begin when the SMP blocks content and routing the guests to a page showing information that this content is blocked and that you need to log in or register. For some reason, this page is not showing my Elementor header and footer, but rather header and footer design from the BulkPRO theme.
I must admit that I’m relatively new to Elementor and PHP (using C# at work), but I have peeked into the PHP file from the SMP plugin and found this code:
function swpm_fpp_show_not_logged_msg() { $msg = swpm_fpp_get_login_link(); $title = "This Content is Restricted"; //Show site header and footer with the protection message output. get_header(); echo $msg; get_footer(); exit; }The swpm_fpp_show_not_logged_msg function is called when guests is trying to access pages that are protected and it looks to me that it is using the get_header() and get_footer() commands to get header and footer.
So, do anybody have any tips to why my custom Elementor header and footer are not shown? Isn’t the WordPress functions get_header() and get_footer() making sure my Elementor header and footer is used?
Thank you in advance
PS: I’m using the latest version of WP and Elementor/Elementor Pro
The topic ‘My Elementor header and footer not used by WP’ is closed to new replies.