WordPress.org

Ready to get started?Download WordPress

Forums

Hierarchical Pages Widget
Warning message when including categories (7 posts)

  1. ilan.za
    Member
    Posted 1 year ago #

    I wanted to make two groups of sub-categories which are under the same parent, which works, but this warning shows up:

    Warning: Invalid argument supplied for foreach() in /htdocs/public/www/wp/wp-content/plugins/hierarchical-pages/hierpage.php on line 340

    How to solve?
    Or is there another way to show two separate groups of category under the same root?

    http://wordpress.org/extend/plugins/hierarchical-pages/

  2. wlindley
    Member
    Plugin Author

    Posted 1 year ago #

    Hmm... as a test, could you please change two lines above the 'foreach' (should be line 338) from this:

    if ( $cats ) {

    to this:

    if ( !empty($cats) ) {

    and see whether that solves the problem?

  3. ilan.za
    Member
    Posted 1 year ago #

    well, it give me this error in the editor:

    Parse error: syntax error, unexpected T_VARIABLE, expecting '(' in /htdocs/public/www/wp/wp-content/plugins/hierarchical-pages/hierpage.php on line 329

    ...

  4. wlindley
    Member
    Plugin Author

    Posted 1 year ago #

    Please try version 1.6.

  5. ilan.za
    Member
    Posted 1 year ago #

    It keeps displaying the warning:

    Warning: Invalid argument supplied for foreach() in /htdocs/public/www/wp/wp-content/plugins/hierarchical-pages/hierpage.php on line 346

    But only when I include the IDs, if I exclude it works. But I want to show only the children of the current categories, so it will be easier to include only the ids i want...

  6. BrittanyLea
    Member
    Posted 1 year ago #

    I am experiencing the same problem. I have a main parent category with 8 child categories... and then those 8 child categories have "children". It is displaying one of the child categories correctly but the children of the other child categories are not showing.

    I am also using the 'include' functionality and getting the following error....

    Warning: Invalid argument supplied for foreach() in /var/www/vhosts/dev.superboat.com/httpdocs/wp-content/plugins/hierarchical-pages/hierpage.php on line 115

    This plugin is exactly what I need if I can get it working properly... Thanks for creating!

  7. BrittanyLea
    Member
    Posted 1 year ago #

    See example of error message from statement above...

    http://dev.superboat.com/wp-content/uploads/2013/02/Picture-10.png

    The page in question is: http://dev.superboat.com/race-teams/superboat-unlimited/cms-3/

    Thank you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.