WordPress.org

Ready to get started?Download WordPress

Forums

Override function _page_level_out() (2 posts)

  1. jaseone
    Member
    Posted 9 years ago #

    At my site http://www.jasonbainbridge.com I have been using a hack to display a CSS dropdown menu with a calll to wp_list_pages() but to get this to work I had to hack the function _page_level_out in template-functions-post.php, which I don't really like doing and have been trying to think of a cleaner way to do it.

    At first I thought instead of calling wp_list_pages I'd create my own function jb_cssmenu_wp_list_pages (or similar depending on what the standard is) in a seaprate file as part of a plugin or theme but it isn't that function I'm modifiying it is the underlying _page_level_out function so I'm a little stumped on the best practice here.

    I am trying to prepare things so I can move over to upgrading via SVN without needing manual intervention and this is the last thing in the way of that so any guidance would be much appreciated! :)

  2. jaseone
    Member
    Posted 9 years ago #

    I ended up finding http://www.webspaceworks.com/wp-plugins/foldpagelist.html and followed their lead creating a new plugin with my version of wp_list_pages (jbcssmenu_wp_list_pages) that is only modified to call jbcssmenu_page_level_out() instead of the original, which is my hacked version so the unordered lists come out in a more friendly format for a CSS Menu.

    So stay tuned for the CSS dropdown menu to be released in a format friendly for re-distribution. :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.