Okay
  Public Ticket #3028783
Global Section
Closed

Comments

  •  3
    lateliercom started the conversation

    Hello, how can i add global section after hook in funtion.php ?

  •  279
    Noah replied

    Hi there,

    You could attach another hook that shows the global section using a do_shortcode method. See below example:

    add_action('salient_portfolio_hook_single_before_content','salient_porfolio_custom_global_section',1);
    function salient_porfolio_custom_global_section() {
      
        echo do_shortcode('[nectar_global_section id="YOUR_GLOBAL_SECTION_ID"]');
      
    }
    

    here we are hooking salient_portfolio_custom_global_section to the salient_portfolio_hook_single_before_content action.

    The salient_portfolio_custom_global_section function prints out the results of the do_shortcode function that has the global section shortcode that is

    [nectar_global_section id="YOUR_GLOBAL_SECTION_ID"]

    replace YOUR_GLOBAL_SECTION_ID with the ID of the global section.

    Hope this helps.