Answer by Michael for Custom HTML in specific category single page and its...
A few changes to your code:Changed the action hook to wp_head.Removed the false 'pluggable' wrapping of your function.if ( ! function_exists( 'post_is_in_descendant_category' ) ) { function...
View ArticleAnswer by Michael for different sidebars depending on template...
One possiblilty:Keep the new code in sidebar.php in your child theme.In blog-page.php, change the line get_sidebar('blog-sidebar'); to do_action( 'storefront_sidebar' ); (as in an original...
View ArticleAnswer by Michael for How to add a shortcode function that returns the...
get_the_terms() will always return an array; but because you have only one 'project_category', you can simply use its first element:add_shortcode( 'return_taxonomy_slug',...
View ArticleAnswer by Michael for add_filter on "the_excerpt" only works when post does...
I posted an article about this a while ago:function wp_trim_all_excerpt($text) { // Creates an excerpt if needed; and shortens the manual excerpt as well global $post; $raw_excerpt = $text; if ( '' ==...
View Article