Skip to main content
edited tags
Link
user85513
  • 135
  • 1
  • 9
Source Link
user85513
  • 135
  • 1
  • 9

Can the_post_navigation() be outside of the loop?

I am wondering if the_post_navigation() function will work properly outside the loop in single views.

For example:

while ( have_posts() ) : the_post();

  get_template_part( 'template-parts/content', 'single' );

endwhile;

the_post_navigation();