I’m creating a theme framework for my very own functions.
So this time i’m going through an issue, that’s add_action
works out facet conditional.
add_action( 'meanz_before_main_wrap', 'meanz_entry_header_structure_open', 5 );
add_action( 'meanz_before_main_wrap', perform(){echo "<div class='title_cat'>";}, 6 );
add_action( 'meanz_before_main_wrap', perform(){echo meanz_post_cats();}, 7 );
add_action( 'meanz_before_main_wrap', 'meanz_do_title', 25 );
add_action( 'meanz_before_main_wrap', perform(){echo "</div>";}, 49 );
add_action( 'meanz_before_main_wrap', 'meanz_do_thumbnail', 50 );
add_action( 'meanz_before_main_wrap', 'meanz_entry_header_structure_close', 100 );
In any other case if is use a conditional like this, it would not work
if(is_single()){
add_action( 'meanz_before_main_wrap', 'meanz_entry_header_structure_open', 5 );
add_action( 'meanz_before_main_wrap', perform(){echo "<div class='title_cat'>";}, 6 );
add_action( 'meanz_before_main_wrap', perform(){echo meanz_post_cats();}, 7 );
add_action( 'meanz_before_main_wrap', 'meanz_do_title', 25 );
add_action( 'meanz_before_main_wrap', perform(){echo "</div>";}, 49 );
add_action( 'meanz_before_main_wrap', 'meanz_do_thumbnail', 50 );
add_action( 'meanz_before_main_wrap', 'meanz_entry_header_structure_close', 100 );
}
Do not know why it would not work. Any feedback?
Sorry for fallacious code. Up to date the query.