Add a content area below the slider?

Not sure if this is possible or not - I have a page with the slider set below the masthead, and the page is set for content-left/sidebar-right.

I’d like to add a content area below the slider that is the full site width; If I add it to the page, it won’t be the full width (since the sidebar will come into play).

Is there a way I could add something like the “topbar” - where I could have text that could be styled, but have it appear under the menu and under the slider, but still take the whole page width?

Hi @mcphoto,

Thank you for writing in, that is possible by utilizing the Global Block feature, please create your custom content as Global Block, and then follow the guide provided here on how you can hook that global block under your slider.

Hope it helps,
Cheers!

Thanks, that looks like it will work - however, the php code for the child theme seems to be setup to add the block to blog pages or the blog directory page - I’d like to add it to every page - is there a guide somewhere to adapting the php to achive this? thanks again!

Hello @mcphoto,

If you want your global block to appear in all the pages, you will have to use this code:

// Add a custom content section
// =============================================================================
add_action('x_before_view_global__slider-below', 'custom_content');
function custom_content(){
    echo do_shortcode('[cs_gb id=123]');
}

Just do not forget to insert the correct Global Block shortcode.

Thanks a bunch, will give it a shot!

Worked perfectly - quick question, if I want the global block above the slider but under the menu, what changes in the php code? (My PHP expertise: I’m a master of cut and paste…) Thanks again!

Hello @mcphoto,

The given code will place the global block above the slider.

If you want to display a global block below the slider, you will need to use this:

// Add a custom content section
// =============================================================================
add_action('x_after_view_global__slider-below', 'custom_content');
function custom_content(){
    echo do_shortcode('[cs_gb id=123]');
}

What has changed? It is the x_before_view_global__slider-below into x_after_view_global__slider-below.

Hope this explains it.

Thanks, makes sense!

You are most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.