• I need to find a way to embed a global section to display a title bar above all individual event details pages.

    I have previously used code similar to the below for displaying the same on shop pages etc. But I guess I would need it adjusted slightly so it would work on the single events and category pages etc.

    add_action( ‘woocommerce_before_main_content’, ‘salient_child_shop_banner’);

    function salient_child_shop_banner() {

      echo do_shortcode(‘[nectar_global_section id=”THE_ID_OF_YOUR_GLOBAL_SECTION”]’);

    }


    If there is another way of achieving this please advise.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter infosecpartners

    (@infosectomslade)

    I will upgrade to premium if this is something that I know can be resolved.

    Thread Starter infosecpartners

    (@infosectomslade)

    got it working for single events using 

    add_action( ‘nectar_hook_after_outer_wrap_open’, ‘salient_child_events_banner’);
    function salient_child_events_banner() {
    ? global $post;
    ? if( is_post_type_archive( ‘event’, ) || is_singular( ‘event’ ) ) {
    ??? echo do_shortcode(‘[nectar_global_section id=”20139″]’);
    ? }
    }

    Just need to work out what to do for individual category view

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘add global title bar’ is closed to new replies.