The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Something rewrites my php (2 posts)

  1. portdeco
    Posted 5 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

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

    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

    <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.


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

  2. elfin

    Posted 5 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