I am not a coder. But I am a do it yourselfer. And with all my blogs, I either find out how to write code to accomplish a specific task, or I find a plugin. And this post is a bit of both.
First, take a look at my post regarding the addition of aerial golf course maps on my Columbus, Ohio centric blog the270.
At the end of my narrative, you will find a list of golf courses added to the blog. The list is automatic. That is, as I continue to add aerial golf course maps, WordPress automatically includes those maps to the list. I don’t have to go back and manually code the list.
First Create a Parent Page

The first step in how I accomplished this was to create a page called “Golf”. To do, go to the Write Page tab and create a page with the Page Title “Golf”.
Next create Child pages

After I created the Golf page, which appears asĀ http://the270.com/golf/, I created individual pages with the Golf course as the name of the page. In the right hand sidebar, goto the Page Parent field and select “Golf” as the parent page. Of course, your parent page will differ according to the name of your page.
The PHP code needed to display the “child” pages in alphabetical order
Next I did inserted the following PHP code in the text “code” field of my post.
<ul>
<?php wp_list_pages(’child_of=63&sort_column=post_title&title_li=&depth=1′) ?>
</ul>
The number “63″ of the above code corresponds to the ID code of the “Golf” page that I created. To determine the ID number of your page, goto the Manage > Pages tabs and search for your page title. The ID number will be to the left.

In the example above, the “Golf Club of Dublin” post is a child of the “Golf” post. Hypothetically, I could have created another page with the “Golf Club of Dublin” being the parent. In this hypothetical, that post would be I guess the grandchild of the “Golf” post. I would not want to display the grandchild pages in my list. So to exclude grandchildren, you set the depth as 1 in the PHP code above.
But we are not yet finished.
Plugin to run PHP code within WordPress pages or posts
If I stopped with the above and published the post, the list would not have generated. That’s because WordPress ignores PHP code within posts or pages. That’s where the plugin runPHP comes in handy. After you activate this plugin, you can insert PHP code within your posts or pages, and they will work.
In the right sidebar, all you need to do is make sure there is a check mark in the box next to the words “run PHP code?”
After that, just publish and let WordPress and PHP run its magic.
You Should Also Check Out This Post:
- Where to get Psychological Triggers for free
- SEO Book's Rank Checker Tool
- Thinking about vlogging? You can do it cheaply. Just ask Sarah.
- Reasons to Use Google Docs to Publish to Your Blog
- I'm going to PodCamp Ohio. Are you?
More Active Posts:
- How to embed QuickTime video's into your WordPress Blog (5)
- Sexy blogging (3)
- Focus on a few websites to turn the internet buck (2)
- Reasons to Use Google Docs to Publish to Your Blog (2)
- How to automatically generate a page list within a WordPress page or post (2)
- Welcome to SemiProBlogging (1)
- SEO videos on YouTube (1)
- What a great photo! Can I use it for my blog? (1)
- Tip for Google AdWords Advertisers (1)
- For higher click throughs, match your AdSense and blog link colors (1)















Hi. My name is Alvin. The picture you see is me with my lovely daughter, who along with my son, are the reasons I'm a semi-pro blogger. Semi-Pro because I don't make a full time living by blogging. I have a full time job (which I love by the way), and I blog to