WordPress.org

Ready to get started?Download WordPress

Forums

Next Page, Not Next Post
[resolved] Link from Child to Grand Parent does not work (3 posts)

  1. banesto
    Member
    Posted 3 years ago #

    Thanks for this useful plugin, but there's one feature it should have.

    If I have structure like this:

    - Grand Parent 1
    -- Parent 1.1
    -- Parent 1.2
    --- Child 1.2.1
    --- Child 1.2.2
    -- Parent 1.3
    --- Child 1.3.1
    --- Child 1.3.2
    --- Child 1.3.3
    - Grand Parent 2

    And if LOOP = 'expand' then

    1) next_page_not_post on page 'Child 1.2.2' gives link to 'Parent 1.3' which is fine.
    2) next_page_not_post on page 'Child 1.3.3' gives blank, but it should link to 'Grand Parent 2'.

    http://wordpress.org/extend/plugins/next-page-not-next-post/

  2. banesto
    Member
    Posted 3 years ago #

    it can be healed this way:

    change line 44 from:

    $getParentPages = get_pages('child_of='.$parentInfo->post_parent.'&parent='.$parentInfo->post_parent.'&'.$getPagesQuery);

    to:
    $getParentPages = get_pages($getPagesQuery);

    and

    change line 50 from:
    if ($post->post_parent == $getParentPages[$pp]->ID) break;
    to:
    if ($post->ID == $getParentPages[$pp]->ID) break;

  3. Matt McInvale
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks for the fix, this has been rolled into the plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic