Hook Issue
-
Hi, I am new to PHP. I am trying to add a shortcode using GP hooks, but the issue is instead of the execution result of the shortcode, the shortcode itself is displayed.
The PHP code I am using is
add_action( ‘generate_after_header_content’,’example_function_name’ );
function example_function_name() {
if ( ! is_home() ) : ?>
echo do_shortcode(“[adsforwp id=”5306″]”);
<?php endif;
}It prints “[adsforwp id=”5306″]”.
Please help me with this.
Thank You.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Hook Issue’ is closed to new replies.