• Resolved caladan

    (@caladan)


    hi there,
    i try to exclude a page from the menu. since i have a custom made theme, i cant get the “exclude” option to work and diddnt find help by searching:

    the code is:

    <?php 
    
    	// content
    	if ( have_posts() ) while ( have_posts() ) : the_post();
    	the_content();
    	endwhile;
    
    	// list sub pages
    	echo '<ul class="arrow">';
    	wp_list_pages('title_li=&child_of='.get_the_id());
    	echo '</ul>';
    ?>

    where can i fit in the “exclude=123” option?

    thanks for your help!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • wp_list_pages('title_li=&exclude=23&child_of='.get_the_id());

    Thread Starter caladan

    (@caladan)

    mhm, i tryed this, but the page still appears in the menu.
    its a sidescrolling theme where i cant write articles, only create pages. could there be another part of code that needs to be changed?

    i have no idea, but it doesnt work like that.

    thanks esmi!

    Are you sure that you have the correct page id?

    Thread Starter caladan

    (@caladan)

    ah, i got it. the page id was right, the page just used a wrong style sheet. it works now with the code above.

    thanks so much!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘exclude a page from the menu’ is closed to new replies.