Forums

[resolved] simple php question from a newbie (6 posts)

  1. dblast
    Member
    Posted 3 years ago #

    Hi I am using Daiko's widget and I want to display only one page currently I am doing this by excluing all others is there an easier way to do this?

      <?php wp_list_pages('orderby=name exclude=2,28,35,53,315,317,319,310,70,417,109,112,114,355,369,366,362,353,384,426,443,371,75,210&title_li='); ?>

    I would like to display only page 517 but in the list form, which keeps my theme formatting. Doing it other ways changes the flow and look of the sidebar.

    Thanks

    Dan

  2. MichaelH
    Volunteer
    Posted 3 years ago #

    Couldn't you just use the include=517 parameter?

  3. dblast
    Member
    Posted 3 years ago #

    Thanks, that did the trick:

      <?php wp_list_pages('inlcude=517'); ?>

    For anyone else that needs it. If you want to add another page add a comma.

      <?php wp_list_pages('inlcude=517,2'); ?>
  4. whooami
    Member
    Posted 3 years ago #

    <?php wp_list_pages('orderby=name&include=517&title_li='); ?>

    http://codex.wordpress.org/Template_Tags/wp_list_pages

  5. dblast
    Member
    Posted 3 years ago #

    thanks, I notice though it lists 'pages' above the list how do I get rid of that I just want the pages listed not the 'pages'?

    http://www.warrior-scholar.com/wordpress/

    If you notice the sidebar it lists the title of the box 'ws students' THEN the word 'pages' then the page link. I just want the page link.

    THanks

  6. dblast
    Member
    Posted 3 years ago #

    Nevermind I added

      tag and the title _li and its fine.

      Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.