Taxonomy listing issue – does not display how I would like

SOLVED I found the answer in another post that was answered by @Gustav for anyone looking a solution like you can follow the link or view the code below it works perfectly. https://wordpress.stackexchange.com/questions/123059/list-post-from-current-taxonomy-children THE WORKING CODE <?php $term_slug = get_query_var( ‘term’ ); $taxonomyName = get_query_var( ‘taxonomy’ ); $current_term = get_term_by( ‘slug’, $term_slug, $taxonomyName ); $termchildren … Read more

Archive pagination – second page shows exactly the same posts

Put this code <div class=”row”> <div class=”col-md-8 col-md-offset-2″> <?php $args = array( ‘posts_per_page’ => 3, ‘post_type’ => ‘work’, ‘paged’ => get_query_var(‘paged’) ? get_query_var(‘paged’) : 1 ); $myposts = new WP_Query($args); ?> <?php single_term_title(); ?> <?php if ( $myposts->have_posts() ) : ?> <?php while ( $myposts->have_posts() ) : $myposts->the_post(); ?> <?php get_template_part( ‘content’, get_post_format() );?> <?php … Read more

Assign a tag to custom post type using a query

Put code below to your functions.php add_filter(‘pre_get_posts’, ‘query_post_type’); function query_post_type($query) { if(is_category() || is_tag()) { $post_type = get_query_var(‘post_type’); if($post_type) $post_type = $post_type; else $post_type = array(‘post’,’cpt’); // replace cpt to your custom post type $query->set(‘post_type’,$post_type); return $query; } }

Paginate yearly archives for a custom post type

Your regex cannot work: $wp_rewrite->preg_index(3) doesn’t match anything, because you capture only one part in ‘/([0-9]{4})/?$’, not three. Try to add the page parameter: $pagination_base = $GLOBALS[‘wp_rewrite’]->pagination_base; $month_archive = array( $myqueryslug . ‘/([0-9]{4})(‘ . $pagination_base . ‘/(\d+))?/?$’ => ‘index.php?year=” . $wp_rewrite->preg_index(1) . “&post_type=” . $myqueryslug . “&paged=’ . $wp_rewrite->preg_index(3) ); I haven’t tested it, just … Read more