IT Nursery
<?php $current_term = $wp_query->queried_object->name; $current_term_id = $wp_query->queried_object->ID; ?> <hgroup class="section-heading wrapper"> <h1><?php echo $current_term; ?></h1> <h3><?php echo category_description( $current_term_id ); ?></h3> </hgroup> This works fine but the $current_term_id variable...
  • May 1, 2022
  • 0 Comments
IT Nursery
I try to add tax query on pre_get_posts hook using following code : // Add custom posts to main query (archive and home) add_action( 'pre_get_posts', 'add_post_types_to_query' ); function add_post_types_to_query(...
  • May 1, 2022
  • 0 Comments