WordPress.org

Ready to get started?Download WordPress

Forums

Something rewrites my php (2 posts)

  1. portdeco
    Member
    Posted 3 years ago #

    Hi, I hope someone can help i'm sure i'm doing something stupid but i'm just a beginer so please have patience.

    Something is rewriting my php code!

    I write the following code into a nav.php file which gets called by header.php to give myself selected main navigation options at the top of the page

    <ul>
    <h2>
    <li><a>/">Home</a><?php wp_list_pages('include=29,94,2,4,41,129,126,131,133,37&title_li='); ?></li>
    </h2>
    </ul>

    When i upload this to the theme folder it works and only displays the page links i want. but if i want to add another included page, when i download nav.php to alter it something has changed the code to

    <ul>
    <h2>
    <li><a>/">Home</a><?php wp_list_pages(

    Is this because i have made a mistake in my code and if it is can anyone please spot the error and let me know.

    thanks

    [Please post code between backticks or use the code button]

  2. elfin
    Moderator
    Posted 3 years ago #

    <li><a>/">Home</a> is incorrect, though it shouldn't affect other things, try altering it to:
    <li><a href="/">Home</a>

Topic Closed

This topic has been closed to new replies.

About this Topic