Support » Plugins and Hacks » AutoNav Graphical Navigation and Gallery Plugin » [Plugin: AutoNav Graphical Navigation and Gallery Plugin] Add creation date of page

  • Resolved infohowdy

    (@infohowdy)


    Hello, I use autonav for subpage navigation.

    <?php print autonav_wl_shortcode(array(‘display’=>’list,thumb,excerpt’,
    ‘start’=>$image_start, ‘count’=>4,’size’ => ‘188×188’, ‘postid’ => 1, ‘titles’=>’1’ )); ?>

    How I can add the creation date of pages?

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author wlindley

    (@wlindley)


    Right now you would have to modify the code, but the next version will permit extensions like this through the use of filters. Please email me if you would like to beta-test.

    Plugin Author wlindley

    (@wlindley)


    Here is how you would do this from your code, with the next version of AutoNav:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Plugin Author wlindley

    (@wlindley)


    Ugh, when did that “forum rule” crop up? Irritating. Anyway you will be able to define a function which will add the date, but only to posts not pages:

    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;
      }

    and then add it into the filter list after the image and the title but before the excerpt:

    add_filter('autonav_create_table_item', 'my_create_output_date', 18, 4);

    Hello Wlindley, I thankyou very much !!! This is exactly what I mean !!!
    Thankyou !!! 🙂

    Plugin Author wlindley

    (@wlindley)


    Please try this and advise. There is a whole new section on filters in the Readme.

    Plugin Author wlindley

    (@wlindley)


    A more detailed explanation, and a few other examples, are here.

    Thankyou again

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: AutoNav Graphical Navigation and Gallery Plugin] Add creation date of page’ is closed to new replies.