Hierarchical Pages Widget
[resolved] Fails if I set a Root Page ID... (4 posts)

  1. Strategerizer
    Posted 5 years ago #

    If I set a Root Page ID in the widget options, it fails on page and displays:

    "Warning: Invalid argument supplied for foreach() in /home/username/public_html/wp-content/plugins/hierarchical-pages/hierpage.php on line 119"

    Any chance for a fix? Otherwise this plugin is the single one I found that is doing what I need...

    I need to set the Root so it displays the subpage navigation for only a section of the site.

  2. wlindley
    Plugin Author

    Posted 5 years ago #

    Just found your note -- will look into this.

  3. wlindley
    Plugin Author

    Posted 5 years ago #

    The warning is because your top page (as WordPress sees it) has no children. This is easily dismissed by using an (array) cast in line 119, as:

    foreach ( (array) $page_info[0]['children'] as $child ) {

    (I will incorporate that and a couple similar fixes in the next version.)

    However, that should not have prevented your selected page from displaying. Note that you will only see the selected root page, when viewing anything except a page that is a descendant of that root page.

    Try the above modification, please, and let me know how it goes.

  4. Strategerizer
    Posted 5 years ago #

    In the interim I started using a different plugin to display navigation links to subpages. Thanks for looking into this and providing a solution.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Hierarchical Pages Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic