How to change post navigation based on category
-
Hello, I want to change the navigation link that your theme provides to go to next/previous posts within the same category. I am not adept at php, and would need some help. The code below is the default in loop-meta.php in the parent folder Unos. I am using Unos Glow children theme.
/** * If viewing a single post/page */ elseif ( is_singular() ) : if ( have_posts() ) : // Begins the loop through found posts, and load the post data. while ( have_posts() ) : the_post(); $display_title = apply_filters( 'unos_loop_meta_display_title', '', 'singular' ); if ( $display_title !== 'hide' ) : // Display Featured Image in header if present (static/parallax) $wrap_attr = hoot_data( 'loop-meta-wrap' ); hoot_unset_data( 'loop-meta-wrap' ); ?> <div <?php hoot_attr( 'loop-meta-wrap', 'singular', $wrap_attr ); ?>> <div class="hgrid"> <div <?php hoot_attr( 'loop-meta', '', 'hgrid-span-12' ); ?>> <div class="entry-header"> <?php global $post; $pretitle = ( !isset( $post->post_parent ) || empty( $post->post_parent ) ) ? '' : '<span class="loop-pretitle">' . get_the_title( $post->post_parent ) . ' » </span>'; $pretitle = apply_filters( 'unos_singular_loop_pretitle', $pretitle ); ?> <h1 <?php hoot_attr( 'loop-title' ); ?>><?php the_title( $pretitle ); ?></h1> <?php $hide_meta_info = apply_filters( 'unos_hide_meta', false, 'top' ); if ( !$hide_meta_info && function_exists( 'is_bbpress' ) && is_bbpress() ): if ( bbp_is_single_forum() ) { ?><div <?php hoot_attr( 'loop-description' ); ?>><?php bbp_forum_content(); ?></div><!-- .loop-description --><?php }; elseif ( !$hide_meta_info && 'top' == hoot_get_mod( 'post_meta_location' ) && !is_attachment() ): $metarray = ( is_page() ) ? hoot_get_mod('page_meta') : hoot_get_mod('post_meta'); if ( hoot_meta_info( $metarray, 'loop-meta', true ) ) : ?><div <?php hoot_attr( 'loop-description' ); ?>><?php hoot_display_meta_info( $metarray, 'loop-meta' ); ?></div><!-- .loop-description --><?php endif; endif; ?> </div><!-- .entry-header --> </div><!-- .loop-meta --> </div> </div>
- The topic ‘How to change post navigation based on category’ is closed to new replies.