2015
04.10

I started by adding captcha to comments. Then I decided that I did not want comments to be available on pages. Then I decided I did not want a message that comments were not available on pages. Then I decided that pages should be able to have multiple sections, but that I should not have to have anything whatsoever in the content itself to make that happen. I also decided that I should still have the option to have a single page behave as it already did.

As I thought about how to do that, I noted the parent-child relationship for pages. I thought that would provide a convenient pre-existing hierarchy to work with. I started by modifying the page template so that it loads the page content if it has any, but leaves the content section of the page blank if it does not. Then I added a second wp_query to find any child pages of the first page, and then order them by page order. Next I added a second loop to load the results, and finished with a call to wp_reset_postdata() to wrap everything up.

I have not worked with PHP for a couple of years, but I found WordPress easy to work with, and the Pyrmont V2 theme clean and well written. After a few consults of the WordPress Documentation and a little troubleshooting I had exactly the behavior that I wanted.

No Comment.

Add Your Comment