WordPress & Categories: CMS Potential

Visit the revamped installments section.

With a little hacking, WordPress can be bent to do your will. Powered by WordPress, my installments section now feature larger screenshots and more context. Installments with downloadable source code have been updated to link to this. Additionally, all released source files are now available in the sourcefiles tag.

Installments are now simply filed in a category. The excerpt is shown on the Installments page, and the news will automatically appear in all relevant feeds. As opposed to before, this saves me a lot of work. Additionally, I can benefit from such features as automatically paged navigation, proper timestamps, permanent links, XML feeds and administrators “Edit This Entry” links.

For those of you who use WordPress, here are some of the hacks I’ve used, in case you may find it useful.

Show one category in a custom PHP file

To create a custom PHP file that contains a Post Loop for a single WordPress category, insert the following PHP code in the header of your file:

After this, add your regular HTML code, including the Post Loop where you feel like it.

Show excerpt only if available

When WordPress uses the post excerpt, the default behaviour is to show the written excerpt, and if that is not availabe, show an automatically created excerpt built from the first 120 words of the entry. To override this behaviour and only show the excerpt when a written one is available, use the following code:

post_excerpt != "") {

14 thoughts on “WordPress & Categories: CMS Potential”

  1. Jonas Rabbe says:

    Very cool, you can really tell how much work you’ve put into this. Very cool (it feels like it’s all I say to your entries lately).

  2. Nik says:

    Nice… the keyline on the bottom of the images looks a little odd to me though?

  3. Chris says:

    This is really lovely. Good things, my friend.

  4. Joen says:

    Thanks, I appreciate it. Yeah it does feel a lot bigger this way. But most of all I’m happy it takes less effort to update it. It’s one screenshot less to make (see the small one on the frontpage), every month, and soon two sections less (installments and frontpage) to update.

  5. Joen says:

    Oh, and Nik, that underline is actually because the image is now clickable… i.e. it’s an underlined link. But I’ll grant you, it doesn’t look too clever. I’ll see what I can do.

  6. Chris says:

    Perhaps you could try a border instead? ala

    img a:hover {border: 3px solid #color;}

  7. Joen says:

    Chris, well, yes, that would be nicer. Problem is, the images are exacly the width they are allowed to have (500px), so adding 3px would widen the main column.

    Unless I added some position: absolute; z-index: 1; magic? I dunno. For now it’ll have to do.

  8. Joen says:

    Oh how sweet, I just remembered that now it’s all WP powered, there’s a myriad of “voting” plugins I can use. I could let people vote for best Installment, maybe a “sort by favourite” feature, or something. Brilliant.

    By the way, did anyone notice I nuked the Downloads section, and instead gave Wallpapers a more prominent placement? Stay Tuned™.

  9. Chris says:

    Chris, well, yes, that would be nicer. Problem is, the images are exacly the width they are allowed to have (500px), so adding 3px would widen the main column.

    That’s what I figured. But, could you not set the image size a pizel or so smaller? No need to change the image, just the CSS. No matter. I’m sure you’ll think of something imminently more interesting and clever than I.

    Let me know your experiences re: vote plugins.

  10. khaled says:

    Gotta say I absolutely love your installments page, such an amazing mixture of colour.

  11. Joen says:

    Thanks Khaled, I appreciate that.

  12. AkaXakA says:

    Sir, prepaired to be copied, as this’ll do nicely for my portfolio page 🙂

  13. Joen says:

    Feel free! It works just fine. Now I just need a more clever way to display things on the home page

  14. Leopard says:

    ummm.. When I typed ‘installments’ into the search bar, this was not what I had expected. I meant installments in the business sense, for a school project. any way, what is this website about? ( looks pretty cool to me)

Comments are closed.