• Hannah S.L.

    (@fernashes)


    Automattic Happiness Engineer

    Hey all,

    I’ve been having a bit of a problem with the pages that WordPress uses in combination with php. I’m pretty sure I’m overlooking something, especially since I can’t find a topic that’s already covered this, also not in the Wiki/Codex.

    I’m trying to put my links on a separate page than the main page. I’ve been working with pages somewhat, though without PHP – this has worked fine.

    As soon as I add this line to the page, it goes wrong:
    ?php wp_get_links(2); ?

    All it does is show the text exactly as it is above (including < and >, though).

    My first thought was that the pages just don’t realize that they needed to deal with PHP on their own, so I took the entire code from the index in the theme, deleted the loop and added the get_links bit. I’m getting the same exact thing: everything’s being printed in text instead of being realized.

    If I try to take the whole code that I just explained and stick it in a “links.php” then I just get parse errors… which is exactly what happens if you try to call up category.php or any other page.

    Other than that, my blog works fine, so it can’t be that problem. 🙂

    Does anybody know what I’m doing wrong?

    If you’d like to see what I’m talking about, here’s the link to the page – here.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Pages not working with PHP?’ is closed to new replies.