• Hello! I have cpt “video” with custom_taxonomy “video_author”.
    In “single-video.php” I write:

    previous_post_link('%link','', true, '','video_author');
    next_post_link('%link','', true, '', 'video_author');

    And nothing happens. Though:

    previous_post_link('%link','',);
    next_post_link('%link','',);

    works fine, but doesn’t give me exact result I want. I want to display posts from same custom taxonomy term. What I’m doing wrong? Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi there?

    Can you show us your cpt register and taxonomy register code? Since the use of pagination without the c-tax is working, I’m not going to ask if it’s properly placed.

    Thread Starter Vishnja1

    (@vishnja1)

    It’s registered through “Types” plugin. I had already written custom function for next/prev post. But I’am still interested why original function isn’t working.

    Did you initialized this variable?

    <?php $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;

    Thread Starter Vishnja1

    (@vishnja1)

    No. Am I supposed to change something additionaly?

    Kindly check the documentation of that function.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘"next_post_link" and "previous_post_link" not woking with "$in_same_term&qu’ is closed to new replies.