Nothing new here, but check out cvntrak.org

Nothing’s been going on here since I’ve been busy hacking up Central Valley NTrak, my model railroad site. It’s now a full WordPress site–all content is managed by WP. I learned a few things about Pages (note the capital “P”) and hierarchal categories which I thought I would share. (Or at least write down, so I don’t have to re-learn them the hard way!)

The site is using a modified version of BB Iverson’s theme, Spirit, which has a few non-post Pages linked from the header. Creating the pages sounded pretty easy, so I jumped in. I got the pages created okay, but I couldn’t view them–I kept getting 404 errors whenever I tried to browse cvntrak.org/archives/. I thought perhaps I had set the page template incorrectly, or perhaps I should have titled the page “archives” instead of “Archives”. I tried all kinds of things, to no avail. Eventually I found a reference to “the default ‘pretty’ permalink format”, so I double-checked that I had indeed set these up correctly, and found my problem–I had turned off write access to my .htaccess file after I got the permalink format set initially, and there were a whole bunch of new rewrite rules to be added for the new Pages I had written. I played with this a little bit more, and it seems like you need to visit the Options/Permalinks page and hit “Update permalink structure” whenever you create a new Page. I tried leaving .htaccess writable, then creating a Page, then viewing it, and I always got 404’s for pages created after the most recent permalink update. I don’t like leaving this file writable, so I’ll just cut-and-paste if I ever need to change the rewrite rules again.

“Spirit” has a category list in the left sidebar, generated by wp_list_cats(). I set up hierarchal categories for this site, with a couple of top-level “container” categories. Then I made the first post and filed it under the child categories, published it and viewed the home page and wp_list_cats showed… nothing! I futzed around with this for a while and finally I made a post in one of the top-level categories. Voila! All of a sudden I can see the category hierarchy in the sidebar, at least for all children of the top-level category with a post. I have to play with this some more to see exactly when it breaks. I’m not sure if this is a bug, or maybe I don’t completely understand how wp_list_cats() is supposed to work.

About Jim Vanderveen

I'm a bit of a Renaissance man, with far too many hobbies for my free time! But more important than any hobby is my family. My proudest accomplishment has been raising some great kids! And somehow convincing my wife to put up with me since 1988. ;)
This entry was posted in Uncategorized and tagged , , , , . Bookmark the permalink.

One Response to Nothing new here, but check out cvntrak.org

  1. Pingback: SonicChicken weblog » Blog Archive » New website for my wife’s business

Leave a Reply

Your email address will not be published. Required fields are marked *