[Resolved] Volume: Custom Post Navigation not behaving as expected

Home Forums Support [Resolved] Volume: Custom Post Navigation not behaving as expected

Home Forums Support Volume: Custom Post Navigation not behaving as expected

  • This topic has 5 replies, 2 voices, and was last updated 4 years ago by David.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1230928
    Tim

    Hello

    I’m finding that the Custom Post Navigation hook is not behaving as expected.

    I would presume that each time this navigation is displayed, it should show the previous/next post by date.

    But in the cited URL there is no next post displayed, even though there IS a later post of the same category.

    Incidentally the anticipated later post also does not display the previous post.

    What could be awry here ?

    #1231385
    David
    Staff
    Customer Support

    Hi there.

    can you try rebuilding permalinks ?
    Go to Settings > Permalinks and hit save a couple of times.
    Note: ( if i remember correctly ) the Post Nav is not limited to the current post category….

    #1232016
    Tim

    Hi David

    I did try that a few times, and clearing browser cache, but no joy.

    Yes it was another question I was going to ask: “how to limit to current post category ?”.

    #1232357
    David
    Staff
    Customer Support

    The Nav is added using a Hook element in Appearance > Elements –> Custom Post Navigation.
    Within the code you’ll see two lines:

    $prevPost = get_previous_post(false); & $nextPost = get_next_post(false);

    swap false for true and the posts displayed will be in the same category.

    Can’t explain why that post is not displayed the nav – try creating a new post to see if that works.

    #1233457
    Tim

    OK that’s great and once I set them to true the problem post was finally displayed in the custom nav.

    #1233574
    David
    Staff
    Customer Support

    Glad to hear that

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.