I've looked around the tutorials but they all seem to have different codes and stuff so I couldn't figure this problem out with my extremely limited knowledge. I'm using the Big Brother Theme.
I want to make my previous / next buttons go to the previous and next post in the same category and I also want the buttons to say previous chapter and next chapter.
This is my single.php
<?php
/**
* The Template for displaying all single posts.
*
* @package big-brother
*/
get_header(); ?>
<?php if( function_exists( 'big_brother_the_breadcrumbs' ) ) : ?>
<div class="breadcrumbs">
<?php big_brother_the_breadcrumbs(); ?>
</div>
<?php endif; ?>
<div class="primary content-area">
<main id="main" class="site-main" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<div class="article-wrapper">
<?php get_template_part( 'content', 'single' ); ?>
</div>
<?php big_brother_content_nav( 'nav-below' ); ?>
<?php
// If comments are open or we have at least one comment, load up the comment template
if ( comments_open() || '0' != get_comments_number() )
comments_template();
?>
<?php endwhile; // end of the loop. ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
and this is index.php
<?php
/**
* The main template file.
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package big-brother
*/
get_header(); ?>
<div class="primary content-area">
<main id="main" class="site-main" role="main">
<?php if ( have_posts() ) : ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
/* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that
* will be used instead.
*/
get_template_part( 'content', get_post_format() );
?>
<?php endwhile; ?>
<?php big_brother_content_nav( 'nav-below' ); ?>
<?php else : ?>
<?php get_template_part( 'no-results', 'index' ); ?>
<?php endif; ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Website: Christo Enzo