Comments 3lateliercom started the conversationApril 21, 2022 at 9:09amHello, how can i add global section after hook in funtion.php ? 279Noah repliedApril 21, 2022 at 2:49pmHi 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. Sign in to reply ...
Hello, how can i add global section after hook in funtion.php ?
Hi there,
You could attach another hook that shows the global section using a do_shortcode method. See below example:
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.