Creating a Ethos Blog Index Banner

Hi,

I’m using Pro and Ethos is the base for my blog index. I’m trying to add a Global Block as a banner using the action hook, however I can’t get it to appear correctly as it appears above the Header. I have tried other Action Hooks (x_before_the_content_begin )but still unable to get it to work. Please advise, the code I’ve used are:

add_action(‘x_after_site_begin’, ‘blog_index_banner’);
function blog_index_banner(){
if ( is_home() ){
echo do_shortcode(’[cs_gb id=“91”]’);
}
}

The image that appears is

Sorry wrote to soon. I’ve forgotton to add 30. New code is

add_action(‘x_after_site_begin’, ‘blog_index_banner’, 30);
function blog_index_banner(){
if ( is_home() ){
echo do_shortcode(’[cs_gb id=“91”]’);
}
}

Could you help me by advising what does the number ‘30’ do and if there are other values I can use?

Hi There,

You can try with this hook instead: x_after_view_global__navbar.

The full code should be:

add_action('x_after_view_global__navbar', 'blog_index_banner', 30);
function blog_index_banner(){
if ( is_home() ){
echo do_shortcode('[cs_gb id="91"]');
}
}

Regards!

Thanks for the tip… just a clarification, if that’s the case, on a pro header this would appear only on global headers?

Hi There,

Thanks again for asking!

Yes this is only should appear in global header.

Thanks

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