WordPress.org

Ready to get started?Download WordPress

Forums

AutoNav Graphical Navigation and Gallery Plugin
[resolved] Display images from entire page hierarchy (4 posts)

  1. stuarthardy
    Member
    Posted 3 years ago #

    Is it possible for autonav to display images from an entire "family tree" of pages in a single tag? In other words, from children, grandchildren, great-grandchildren and further down if pages exist.

    We've got a "siblings" parameter, but I guess I'm after something more like "family". My requirement is for a selective display of random images from a larger page hierarchy. In principle, something like:

    [autonav display=images,family count=3 order=rand]

    Can this be achieved via existing tags? For various reasons, selecting via postid by category, tag or author is unsuitable.

    http://wordpress.org/extend/plugins/autonav/

  2. wlindley
    Member
    Plugin Author

    Posted 3 years ago #

    Around line 475 is this stanza:

    foreach ($these_pages as $subpage) {
            if (in_array($subpage->post_parent, $child_pages)) {  // first-generation children only
              array_push($pages, $subpage);
            }
          }

    Could you try removing the if statement, and one close brace, as follows:

    foreach ($these_pages as $subpage) {
              array_push($pages, $subpage);
          }

    and use display=images,siblings in your shortcode for now, see if that is what you want? Then we can make this a permanent option along the lines you described.

  3. wlindley
    Member
    Plugin Author

    Posted 3 years ago #

    Or try this, which will work with the exact shortcode as you proposed. Rename it autonav-wl.php, of course.

    http://www.saltriversystems.com/wp-content/uploads/autonav-wl-139-beta.txt

  4. stuarthardy
    Member
    Posted 3 years ago #

    Excellent, that's exactly what I was looking for. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic