WordPress.org

Ready to get started?Download WordPress

Forums

Navigable
invalid argument when i into category (5 posts)

  1. Geleosan
    Member
    Posted 2 years ago #

    Hello!

    I use this

    <?php $nav = new NavigableWP('My nav menu'); ?>
    <?php if ($sub_nav = $nav->current_subnav()): ?>
    <?php foreach ($sub_nav as $elem): ?>
    <?php echo $elem->title; ?>
    <?php endforeach; ?>
    <?php endif; ?>

    And work fine but when current is a category i get this

    Warning: Invalid argument supplied for foreach() in Z:\home\fujitsu-hp.ru\www\wp-content\plugins\navigable\class-nav.php on line 163

    My nav menu have page and category inside, and i want to make current menu (suv nav tree).

  2. ainth
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Geleosan,

    There was a small bug causing that warning. I just released a new version that should resolve it.

    Let me know if you have any further issues.

  3. Geleosan
    Member
    Posted 2 years ago #

    Thanks for your quick replay!

    I downloaded new version and dont have this error, but when current is a category menu dont display :( When curent is a page its all right.

  4. ainth
    Member
    Plugin Author

    Posted 2 years ago #

    ahh, I see the issue. I'm putting together a new version now to fix this. It still needs more testing before a public release but this should work if you need it now:

    https://github.com/intelligible/Navigable/zipball/0.40

    Just unzip and replace /navigable in your /wp-content/plugins folder.

  5. Geleosan
    Member
    Posted 2 years ago #

    Big thanks! This version work correctly into a category.I will try to use your plugin further for my menu.

    And i found one mistake in your readme and description in this forum. Your function is current_subnav(), but you writed current_sub_nav() in readme.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags