Hallo,
ich habe mal wieder eine Frage. Ich möchte den nächsten und den vorherigen Post innerhalb einer Kategorie anzeigen.
Ich habe nun das Plugin Smarter Navigation gefunden und dort heißt es:
https://de.wordpress.org/plugins/smarte…n/#installation
[COLOR=#0000ff]Replace
[/COLOR]
[COLOR=#0000ff]previous_post_link( with `previous_post_smart(`
[/COLOR][COLOR=#0000ff]and[/COLOR]
[COLOR=#0000ff]next_post_link( with `next_post_smart(`
[/COLOR][COLOR=#0000ff]Referrer link[/COLOR]
[COLOR=#0000ff]If you also want to display a link back to the list of posts, add this line (also in single.php):[/COLOR]
[COLOR=#0000ff]<?php referrer_link(); ?>
[/COLOR]
Ich finde es in meinem Theme nicht. Wo würdet Ihr es hier einfügen?
[COLOR=#0000ff]<?php
/**
* The Template for displaying all single posts.
*
* @package Paraxe
*/
get_header(); ?>
<div class="header-title col-md-12">
<span><?php the_title(); ?></span>
</div>
<div id="primary-mono" class="content-area col-md-8">
<main id="main" class="site-main" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'single' ); ?>
<?php // paraxe_post_nav(); ?>
<?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();
endif;
?>
<?php endwhile; // end of the loop. ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>[/COLOR]
Zum Springen nutze ich Floating Links, das gefällt mir sehr gut. Ich hoffe bzw. verstehe es bisher so, dass Smarter Navigation auch mit dem anderen Plugin funktionieren könnte.
Vielen Dank & liebe Grüße