Support » Plugins » Hook for wp_list_pages(); needed

  • I need a way to hook wp_list_pages(); from a plugin, becuase i want to exclude a specific page from being listed.

    wp_list_pages(); isn’t a hookable function and all my other tries to get controll over that function failed.

    Anybody have an idea?

    thank and regards

Viewing 6 replies - 1 through 6 (of 6 total)
  • You might just be able to retrieve all the pages straight from the DB with a custom query.

    What do you need to do specifically?

    My Plugin ads a Page to wordpress “/shorturl”.
    This page should be invisible, it’s used only as interstitial page for redirecting. Therefor it sould no appear in the pages list.

    wp_list_pages( ‘exclude=8’ ); // e.g.

    solves that problem, but I don’t want the user to edit the template, that’s why I like to exclude the page by the plugin.

    Ok, are you adding a wordpress page to the database (i.e. one of those special posts) or just a php file?

    I don’t think there’s an easy way to exclude wordpress pages from being edited. You’d have to change quite a bit of code in the core files.

    It workes great the way i pointed out. The only thing i don’t want is that the user have to edit whereever wp_list_pages is getting called.

    I found some old usenet postings on that topic, if it solved the problem, i’ll post it here later.

    Oh I think I understand you now.

    I wouldn’t have thought it possible, but I hope you find a solution!

    Hi, it’s possible by a very ugly hack that leads to more problems than solving.
    Therefor I decided to tell the user to edit the template where wp_list_pages(); is called and add the page_id to exclude.

    Anyway thank you for the conversation 😉

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Hook for wp_list_pages(); needed’ is closed to new replies.