Support » Plugins and Hacks » plugin [EXCLUDE PAGES] and apply filters with non standard get_pages

  • Zentode


    my own server

    I have seen how to exclude a specific page from a custom header menu using exclude pages in the menu building function below but, I cannot find how to apply the:

    $pages = apply_filters( 'get_pages', $pages );

    when a non standard menu building function is used. eg:

    <?php function get_the_pa_ges() {
    global $wpdb;
    if ( ! $these_pages = wp_cache_get('these_pages', 'pages') ) {
    $these_pages = $wpdb->get_results('select ID, post_title from '. $wpdb->posts .' where post_status = "publish" and post_type = "page" order by menu_order');
    return $these_pages;
    function list_all_pages(){
    $all_pages = get_the_pa_ges ();
    /*$all_pages = apply_filters(get_the_pa_ges ());*/
    foreach ($all_pages as $thats_all){
    $the_page_id = $thats_all->ID;
    if (is_page($the_page_id)) {
    $addclass = ' class="current_page"';
    } else {
    $addclass = '';
    $output .= '<li' . $addclass . '><a href="'.get_permalink($thats_all->ID).'" title="'.$thats_all->post_title.'"><span>'.$thats_all->post_title.'</span></a></li>';
    return $output;

    I tried several methods on my own with no luck. I searched and searched to no avail.

    How can i apply the exclude pages filter to the function above?

    Any clues for me folks?

    Thanks in advance for your assistance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Zentode





    Wow, first time I never got a answer here!
    I am working on this. Hope I can figure it out..
    If I do I will post it here.

    Hi there,

    I sent out three emails on this also will let you know if i find out anything

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘plugin [EXCLUDE PAGES] and apply filters with non standard get_pages’ is closed to new replies.