Roots Discourse

Elementor theme location support with Sage

Hey gang. First time posting here so I hope this is the right place for this. I’m wondering if any of you have successfully set up Elementor’s theme locations with Sage?

I’ve followed the steps in the docs linked above and read a bunch of articles but my issue is when I create a custom archive with the Elementor Theme Builder, it replaces the header and footer for some reason with i’m assuming Elementor’s default header and footer.

I added this code to the functions.php file:

    add_action('elementor/theme/register_locations', function ($elementor_theme_manager) {

I added these 2 lines to the single.blade.php file and similar lines of code to the footer.blade.php and header.blade.php files and they work fine:

@if ( ! function_exists( 'elementor_theme_do_location' ) || ! elementor_theme_do_location( 'single' ) )

However I added the same if statement to my index.blade.php file and it seems to not be working at all. It’s like it ignores the whole index file when an Elementor archive page is built:

@if ( ! function_exists( 'elementor_theme_do_location' ) || ! elementor_theme_do_location( 'archive' ) )

I feel like I’m going insane haha. If anyone has any suggestions or can show me a working example, i’d really appreciate it!

Here are the relevant view files that we are using:

Not sure why it’s not working :frowning:

Hi, just wondering if you got this fixed as i’m having the same problem!

Hey @hlinton7. Sorry for the slow reply. Never found a solution. I had to just avoid using archive pages and instead create single pages with a plugin called Elementor Custom Skin to display the archive posts. Not ideal :frowning:

This topic was automatically closed after 42 days. New replies are no longer allowed.