WordPress.org

Ready to get started?Download WordPress

Forums

WP-dTree
Using WP-dTree without widgets (2 posts)

  1. afonsoloureiro
    Member
    Posted 3 years ago #

    I was using the previous version but, since I work with multiple languages, using widgets in the sidebar was more dificult, so I had the following code

    if (function_exists('wp_dtree_get_categories')){
    wp_dtree_get_categories();
    else...

    With the new version, the plugin is no longer called. Can I use it without having to use widgets?

  2. ulfben
    Member
    Plugin Author

    Posted 3 years ago #

    Yeah - sorry for the inconvenience; I changed all functions names to establish a somewhat more thought through interface for the plugin. WP-dTree 4.0 exposes the following new template tag functions:

    wpdt_list_archives();
    wpdt_list_categories();
    wpdt_list_pages();
    wpdt_list_links();
    wpdt_list_bookmarks(); //alias for wpdt_list_links

    They function a lot like WordPress own wp_list_* functions:

    • They take an (optional) query-string or associative array with arguments
    • They print by default, but if passed 'echo=0' they return the string of markup
    • Most of them use the WordPress namesake for generating noscript-content

    More info in the docs.

    In summary: the function names changed but everything became infinitely much more useful: you can have multiple trees and individually configure them directly through those getters. Again, apologizes for breaking backwards compatibility.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic