How to add a conditional to this code?
-
add_action('below_header', 'flexx_feature_top', 11); function flexx_feature_top() { global $feature_top; if ( ! empty( $feature_top ) && ( 'none' !== $feature_top ) ) get_template_file( 'feature-top.php' ); }
This function adds a div with some widget areas to my theme: i.e. get-template_file( ‘feature-top.php’ ). Feature-top.php is the template file for the div.
I want to add a conditional line that says “If this is a single post, don’t add the div”. But I don’t know the correct syntax.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to add a conditional to this code?’ is closed to new replies.