SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2011
    Location
    Northern Ireland
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    WordPress wp_list_pages - Exclude by page title? Also SkitterSlideshow

    Can i exclude pages with the wp_list_pages function any way by just using the page title instead of an id? my permalinks are set up to not display id so i dont know what the page id's are...

    Also.. i really want to use the skitter slideshow in my theme, ive added the <?php if ( function_exists('show_skitter') ) { show_skitter(); } ?> to the theme code where i want the slider to be positioned and configured and enabled it but its not displaying.. ive no idea what it means in the usage instructions by creating a post with a "main image" to activate it? Ive already selected the category of images i wish to use and enabled it, included the code in the page template and set the dimensions?

  2. #2
    SitePoint Wizard
    Join Date
    Oct 2005
    Posts
    1,849
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Zany90 View Post
    Can i exclude pages with the wp_list_pages function any way by just using the page title instead of an id? my permalinks are set up to not display id so i dont know what the page id's are...
    http://codex.wordpress.org/Function_..._page_by_title


    Find Page ID to use with exclude in wp_list_pages


    This example will return the $page object for the page titled "About". Then the $page->ID element is used to exclude the About page when listing pages.

    <?php
    $page = get_page_by_title( 'About' );
    wp_list_pages( 'exclude=' . $page->ID );
    ?>

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2011
    Location
    Northern Ireland
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks man but how would i go about excluding more than one page from the list with this method, for example if i wanted to exclude the pages home, about, services and contact but all other pages display?

  4. #4
    SitePoint Enthusiast
    Join Date
    Apr 2011
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its easy enough to find the page ids. If you edit a page you will see the post id in the address bar, something like

    ..../wp-admin/post.php?post=1693&action=edit&message=1
    You can see in there the post id is 1693.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •