To Spring Forth

The Vernal Blog

Drupal > Wordpress Migration Part III: Mashing up posts and pages

Posted by Vernal 583 Days Ago

During the Craft Emergency Relief Fund conversion from Drupal 4.7 to Wordpress 2.1 I had decided to build out the entire information architecture of the site using the Wordpress Pages system.

In the original site the architecture was built upon a hybrid system of diverse content types (primarily pages, stories, and many custom types using Flexinode).

I needed to mimic the Drupal Flexinode system by allowing Wordpress pages to be made up of entries from a given category. I needed this system to be simple and easy to use by the client. Enter Directory Pages.

What is it? How does it work?

Here is what it does:
This is a Page template (compatible with WP 2.0+) that will display the contents of a page but also all posts that exist within a category of the same name as the page. And you can re-use it over and over on your site.

Here is how it works:
Download the template (above)
Put it in your themes directory
Write a new Wordpress page and give it a title. We’ll call ours Staff. You can also give the page whatever content you want.
While editing this page you will see a new page template is available in your Page Templates menu. It is called Directory. Choose it.
Save and publish your page.
Create a new category and name is the exact same thing as your previously created page. Case sensitive, the whole deal. And yes, the code can deal with spaces between words.
Publish a few posts within your newly created category.
View your page and you’ll see the posts showing up within.

So this seems pretty simple and elementary but what is nice about it that you (or your clients) can now create new directory pages at their whim and it’s really easy to do.

Special props goes to Cam from Sporkfancier Consulting for his l33t coding on this one. Top notch.

4 Comments »

  1. hey jason. this series of posts is super helpful. i’ve been trying to create multiple dynamic pages in wp for a while (using pages / categories) unsuccessfully. but the page template you’re referring to above doesn’t seem to be available anywhere. could you repost? or email?

    thx!

    tchandler (a’yen sent me here!)

    Comment by tchandler — February 16, 2007 @ 8:24 am

  2. Hey There,

    I’ve fixed the link in th post, sorry about that. You can now download it above.

    Jason

    Comment by Vernal — February 16, 2007 @ 10:17 am

  3. I have a question about your plugin. Do you know if the plugin is compatible with the Blogpress v2.0 theme for wordpress? I put the file into my themes folder and nothing has happened at all. Please let me know what you think.

    Comment by Jayson — February 24, 2007 @ 8:51 pm

  4. Hey-
    I’ve been messing around with this. I noticed that it will post the posts on the page but ALSO on the main blog page. Is it possible to only have the posts show up on the designated category page?

    Comment by A'yen — March 26, 2007 @ 4:21 pm

RSS feed for comments on this post. TrackBack URI

Leave a comment