Forums

[resolved] Putting two php arguments in one line of code .. (3 posts)

  1. timothyb
    Member
    Posted 1 year ago #

    I'm a php newbie but I'm trying to put two things into one line of code..

    First I want to show a list of pages for my sidebar:
    but exclude a particular page:

    <?php
    wp_list_pages('exclude=2' ); ?>

    Then I want to display just the pages without the word "Pages" showing up in the heading title:

    <?php
    wp_list_pages('title_li='); ?>

    Is there a way to put them both together into one line of code?? I tried commas, semi-colons but I dunno..

  2. fitztrev
    Member
    Posted 1 year ago #

    Use an ampersand:

    wp_list_pages('exclude=2&title_li=');

  3. timothyb
    Member
    Posted 1 year ago #

    Yay! Thanks! Sometimes the most obvious thing is the answer =P

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags