Hello @udidol, open your layout-chapters.php file in your text editor and add a code like this:
<article id="post-<?php the_ID(); ?>">
<?php
// Get posts format
$format = get_post_format();
$format = $format ? $format : 'thumbnail';
// Featured image
get_template_part( 'partials/single/media/blog-single', $format );
// Title
get_template_part( 'partials/single/header' );
// Meta
get_template_part( 'partials/single/meta' );
// Content
get_template_part( 'partials/single/content' );
// Tags
get_template_part( 'partials/single/tags' );
}
// Social Share
if ( OCEAN_EXTRA_ACTIVE ) {
do_action( 'ocean_social_share' );
}
// Next/Prev
get_template_part( 'partials/single/next-prev' );
// Author Box
get_template_part( 'partials/single/author-bio' );
// Related Posts
get_template_part( 'partials/single/related-posts' );
// Comments
comments_template(); ?>
</article>
Then if you want to have the Next/Prev link for your CPT, replace:
get_template_part( 'partials/single/next-prev' );
by:
get_template_part( 'partials/single/next-prev-chapters' );
Go get the next-prev.php file in oceanwp/partials/single/, add it in the same path into your child theme, rename it to “next-prev-chapters.php”, open it in your text editor and replace “$term_tax” at line 27 by your own taxonomy, for example if your toxonomy tag name is “chapters_tags”, replace the variable with that name.
-
This reply was modified 7 years, 5 months ago by
oceanwp.