• Resolved bmfoco

    (@bmfoco)


    Hello! This plugin is great! I had a question I’m not sure if this is a bug or not or is fixable. It appears that if the parent page of a page is not in the current folder and that page has child items, who have child items the hierarchical listing of the pages on the right hand side is no longer heirarchical.

    For instance, say we have a page/parent structure as follows:
    First level Parent
    – 2nd level Parent Two
    — Second level parent two child item 1
    — second level parent two child item 2
    – Second level Parent
    — Second level parent child item 1
    — second level parent child item 2

    If we move all of those into a single folder, they display hierarchically as shown above in the pages panel on the right.

    If we move all of those into a single folder, except for “First level parent” it seems to break the hierarchical ordering of the pages and ends up looking something like this:
    2nd level Parent Two
    `- Second level Parent
    — Second level parent child item 1
    — second level parent child item 2
    -Second level parent two child item 1
    -second level parent two child item 2

    Let me know thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author wickedplugins

    (@wickedplugins)

    Hi @bmfoco,

    You may be able to use the the_title filter to remove the dashes in order to make it less confusing.

    However, since the parent page doesn’t exist in the folder, there isn’t really a way to keep the page hierarchy in tact (WordPress adds the dashes to indicate the hierarchy even if the parent page is filtered out).

    Thread Starter bmfoco

    (@bmfoco)

    Hello! Thanks for that. I think my diagram/explanation didn’t show/explain the issue correctly. Maybe this is better:

    – 2nd level Parent Two
    – Second level Parent
    — Second level parent child item 1
    — second level parent child item 2
    –Second level parent two child item 1
    –second level parent two child item 2`

    The bold items should be together as “second level parent two child item 1” and “second level parent two child item 2” are children of “2nd level Parent two”. Second level parent two is in the same folder as it’s children (second level parent two child item 1 and second level parent two child item 2) but “2nd level Parent two”‘s parent “First level Parent” is in another folder.

    If I put “2nd level Parent two”‘s parent “First level Parent” in the same folder as it, it works as expected. OR if I remove “First level Parent” as the parent item for “2nd level Parent two” it shows as expected as well.

    It seems like if a parent item’s parents are not in the same folder as it and it’s child items the hierarchical ordering breaks in some cases.

    Let me know if that makes more sense/is a bug or all the hierarchical items including parents parents need to be in the same folder for it to show hierarcically.

    Thanks again for your time!

    Plugin Author wickedplugins

    (@wickedplugins)

    Hi @bmfoco,

    I looked into this a bit further and reviewed the WordPress code that organizes the pages based on hierarchy. Unfortunately, it doesn’t appear that WordPress offers any filters or actions in that function to override the logic/behavior so, at the moment, I’m afraid I’m not seeing an obvious solution for how to avoid the issue you’re describing.

    I think work-arounds would be to either include the parent pages in the folder or look into removing the dashes to help avoid the confusion.

    Thread Starter bmfoco

    (@bmfoco)

    Ok thank you I appreciate it very much! Have a good one!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘List of Pages Loses hierarchy if Parent of any page is not in current folder.’ is closed to new replies.