Creates customizable lists/tables of text/thumbnails/links to posts, pages, taxonomies, attachments, custom post types, and image directories.
AutoNav uses the first of these that exist, as the associated picture for a child page:
* The value of the custom field, subpage_thumb. The value can be
either a URL (http://......) or a path relative to the
wp-content/uploads directory (2011/07/image.jpg).
* The post/page Thumbnail ("Featured Image") as set in WordPress
(assuming your theme supports them).
* The attached image with the lowest Order as chosen in the Gallery
tab of the attachment dialog.
NOTE: If a URL is given in subpage_thumb, that image will be used directly; AutoNav cannot resize it. In all other cases, AutoNav will create the needed thumbnail images automatically.
If you don't see the Post Thumbnail (or Featured Image) section in your administration screens, add this to your theme's functions.php --
Create a Custom Field called subpage_title for the page. Set it to what you would like displayed in the table or list of child pages.
When invoked on the page set as the Static Home Page, if that page has no children, then the other pages at top level (those with no parent) are considered as children of the home page. In all other cases, if you wish to display pages at the same level as the current page (i.e., the other children of the parent of the current page), you can use the 'siblings' parameter.
In navigation mode, when a list is selected:
In table modes:
Next/Previous page links (with 'paged' parameter):
The 'subpages' prefix may be overridden by the 'class' parameter or on the administration screen.
These are described in detail in other FAQ entries:
Go through the Autonav Options on the WordPress administration screen once, and save the options. That will add the new parameter names to the list of recognized ones.
Thry the Change Attachment Parent plugin, which is an easy way to reset the parent page or post for any attachment, right on the attachment's Edit screen in the Media Library. You do need to know the new parent's ID, though.
http://wordpress.org/extend/plugins/change-attachment-parent/
Another plugin adds the same feature to the Bulk Actions admin dropdown:
http://wordpress.org/extend/plugins/bulk-change-attachment-parent/
Try the Pagemash plugin which lets you move pages up, down, in, out, and around your hierarchy with the mouse. It automatically changes the pages' parents and menu order.
http://wordpress.org/extend/plugins/pagemash/
If it's posts you wish to rearrange, try this:
http://wordpress.org/extend/plugins/postmash/
and use [autonav display="posts" orderby="postmash"]
Yes, using the Media Library in the admin screens, set an image's Order to -101 or less, and it will not be shown with [autonav display=attached] NOTE: rearranging attachments in WordPress's dialogs will reset all those attachments' order to a positive number.
You can also set the post_status of an attachment to 'private' or 'draft' although WordPress gives you no built-in menus to do this.
The Semi-Private Attachments plugin lets you mark an attachment as private. AutoNav respects this (as doees the built-in gallery shortcode) and will not display it. The plugin also lets you disable comments and pings for an attachment.
http://www.saltriversystems.com/website/private-attachments/
If you upload a picture with a filename that resembles WordPress' resized image names, the Autonav plugin may not be able to find it. For example, if you upload a picture called mybike-640x528.jpg, WordPress will create thumbnails and there will be three files in the uploads directory:
mybike-640x528.jpg
mybike-640x528-150x150.jpg
mybike-640x528-300x247.jpg
Autonav will not find your "full size" picture, the 640x528 one, because it ends in a dash followed by two numbers with an 'x' inbetween. You will have to rename your original picture before uploading it into WordPress.
Examples of displaying excerpts:
[autonav display="list,excerpt"]
[autonav display="posts,list,excerpt" postid="category:news" pics_only=0]
For any post or page, you can always use the custom field 'subpage_excerpt' which will override any WordPress excerpt.
NOTE: By default, WordPress includes the ability to edit manual excerpts only for Posts, not Pages. You can add a single line of code to your theme's functions.php to enable excerpts for Pages:
add_post_type_support( 'page', 'excerpt' );
See also:
http://wordpress.mfields.org/2010/excerpts-for-pages-in-wordpress-3-0/
Yes, you may use this code in your template, for example, where you wish a table of child pages' thumbnails:
<?php print autonav_wl_shortcode(array('display'=>'images')); ?>
or where you would like a table of all attached images:
<?php print autonav_wl_shortcode(array('display'=>'attached')); ?>
Yes; try these three lines:
[autonav display=attached columns=1 count=1 size=500x500]
[autonav display=attached columns=1 start=1 count=1 size=300x300]
[autonav display=attached columns=4 start=2]
You could even include similar calls in a template (see above), showing the first attachment in the large size in one place, the second attachment in medium size elsewhere, and all remaining attachments at perhaps the bottom.
Yes, when displaying attached images, the image's Title as set through the Wordpress admin screen is put into the 'a' tag's title attribute. On modern browsers this becomes a tooltip when hovering over the image inside the anchor.
AutoNav provides filters which you can hook. They are internally called as follows. Note that $class is the effective CSS class for the item in question; $attr is the set of attributes for all pictures, as passed in the [autonav] shortcode and taken from the default values set in the administration screen; $pic is an array created for each page, post, or the like.
$pic_info = apply_filters('autonav_select', $pic_info, $attr); -- Is called whenever display= has a value which is not handled by any of the built-ins, so you can add your own display= values. Return value should be an array in the style of pic_info (see source code). This filter is responsible for creating or finding all thumbnails and setting all links in the pic_info array. If your filter does nothing, you should return $pic_info to permit chaining multiple filters.
$pic_info = apply_filters('autonav_thumb', $pic_info, $attr, $post ) This filter is used to locate the featured thumbnail for a post or page. If $pic_info is not empty, successive filters assume that the thumbnail has been located, and return $pic_info unmodified. The default behaviour is as follows:
add_filter('autonav_thumb', 'autonav_thumb_featured', 10, 4); add_filter('autonav_thumb', 'autonav_thumb_specified', 20, 4); add_filter('autonav_thumb', 'autonav_thumb_attached', 30, 4);
$attr = apply_filters('autonav_pre_select', $attr, $display_options); -- This permits you to modify the array which AutoNav uses to determine which pages or posts to display. Elements here are nearly same as values in the Options screen.
$picked_files = apply_filters('autonav_pick_files', $picked_files, $attr, $pic_size_info); Given the calling arguments ($attr) and an array of image files found for the specified posts, pages, or directories. The latter array also includes information for each of the thumbnail sizes found for each of the full-size images. The filter then picks which images are candidates to include, before the autonav_get_thumbnails filter.
$pics_info = apply_filters('autonav_get_thumbnails', $pics_info, $attr, $pic_size_info); The filter chooses from available sizes in $pic_size_info, or creates resized images.
$pic_info = apply_filters('autonav_post_select, $pic_info, $attr); This filter runs after AutoNav's internal page/post selection process, or after your custom display= selection filter (see above). At this point, AutoNav assumes that all links are set and any thumbnail images have been created. With this filter, you can delete pages from the ready-to-format pic_info array of pages/posts to be displayed, or change values in the array, before the formatting code splits it into tables, or multiple pages (see WP: paginate_links).
$html = apply_filters('autonav_create_list_item', $html, $class, $pic, $attr); $html = apply_filters('autonav_create_table_item', $html, $class, $pic, $attr);
These create the individual list or table entries, and are called once for each post or page which exists in the 'selected' array as passed through the autonav_post_select filter. The input $html is all the HTML output created so far; generally you will append to this and return the extended text. You may add additional filters here to be called in priority order along with the built-in methods; or you may remove the built-in filter and replace with your own. Note the following default priorities for tables: 10 for Image and main content; 15 Title text; 20 Excerpt.
$html = apply_filters('autonav_create_page_links', $html, $class, $total_pages, $cur_page) -- is called in the case of a multi-page display. Again you may wish to append, prepend, or replace.
$html = apply_filters('autonav_html', $html, $attr); Permits you to filter the final HTML which AutoNav generates.
You can hook into any or all of these as in the example below. This code simply displays the contents of the attributes array, so you can see how it works:
function show_the_attrs ($attr) {
print "foo";
print "<br><pre>";
print_r($attr);
print "</pre><br><hr>";
return $attr;
}
add_filter('autonav_select', 'show_the_attrs', 10, 1);
Here is an example of adding information to the table output; it appends the (reformatted) date but only to posts. Note that $pic['page'] is the post/page object from WP_Query.
function my_create_output_date ($html, $class, $pic, $attr) {
if (is_object($pic['page'])) {
if ($pic['page']->post_type == 'post' &&
strlen($pic['page']->post_date)) {
$html .= '<p class="' . $class . '-date">' .
mysql2date('j M Y', $pic['page']->post_date) . "</p>\n";
}
}
return $html;
}
add_filter('autonav_create_table_item', 'my_create_output_date', 18, 4);
No, only the one entry which holds the settings. This is in the wp_options table, with option_name = "autonav_wl" and that will be updated by going through the AutoNav administration screen (see above).
Your webserver needs GD image support in PHP. On Debian or Ubuntu, you can install that with apt-get, and then restart Apache. For example:
$ sudo apt-get install php5-gd
$ sudo /etc/init.d/apache2 restart
J. Christopher's Attachments plugin lets you attach anything in Wordpress's Media Gallery to any post. See: http://wordpress.org/extend/plugins/attachments
Dion Hulse's Add From Server plugin makes it easy to upload images to your server with FTP and them add them directly into WordPress as attachments. In most cases this is now preferable to using AutoNav's "Gallery" mode. http://wordpress.org/extend/plugins/add-from-server/
Requires: 3.0 or higher
Compatible up to: 3.3.2
Last Updated: 2011-12-27
Downloads: 16,803
0 of 1 support threads in the last three weeks have been resolved.
Got something to say? Need help?