Support » Fixing WordPress » Using Functions on WP Pages

  • I’ve created a page in WordPress. This page has a lot of Child Pages. I want touse the wp_list_pages(child_of=1787) function to automatically list all the child pages of this page.

    However when I do that it just shows the code. Is there a way to do this?


Viewing 2 replies - 1 through 2 (of 2 total)
  • 2 ways…. one is to get a plugin that will allow you to run PHP from within your posts/pages (search for runPHP plugin).
    The second is to take a copy of your page.php file (give it a new name) and put the code there. Then from in the page management select the page as the template forthe page. In order for it show up, there needs to be a set of comments at the top. IT should looke liek this:
    Template Name: Snarfer

    Where “Snarfer” is a name you give it and is what will be selectable from the menu.


    Thanks, I installed runPHP and when I run this function it returns blank.

    You can see it here:

    Any ideas?


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using Functions on WP Pages’ is closed to new replies.