Adding global block to archive page

I found this thread discussing adding a global block to a single post (https://theme.co/apex/forum/t/adding-a-full-screen-image-banner-above-blog-title/36781).

Now I want to repeat that by adding a global block to the archive page like this:

add_action( 'x_after_view_global__navbar', 'x_print_section' );
function x_print_section(){
    if ( is_archive() ){
        echo do_shortcode( '[cs_gb id=569]' );
    }
}

For some reason it doesn’t work. Any idea what I’m doing wrong here?

Thank you.

Hi There,

Please make sure you’ve replaced the global block shortcode [cs_gb id=569] with yours.

Can you also please provide us with your archive page and admin account so we can take a closer look?

Thanks.

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