WordPress plugin: Pages are Posts

This is a small plugin for WordPress that makes pages behave more like posts. It’s a quick and simple solution for anyone who uses WordPress like a CMS, with mainly a hierarchy of pages. Normally pages don’t have tags or categories, and they don’t show up on various listings or RSS feeds. Pages are Posts does that. It does two things:

  1. Add tags and categories to posts.
  2. Modify post listings to include pages when they would normally only list posts.

The plugin has been carefully crafted so it does not interfere with normal management views, nor with other plugins that may create new content types. Find the plugin here: http://wordpress.org/plugins/pages-are-posts/

WordPress-blogin nopeusoptimointia

Vaihteeksi täysin tekninen kirjoitus, WordPress-blogin tehostamisesta. Tämä blogi, samoin kuin Opettajan tekijänoikeus, pyörivät omalla serverilläni WordPress-blogiohjelmistolla. Kun taannoin kirjoittelin vähän kiinnostavampia juttuja, huomasin, että blogini palvelivat tosi tahmaisesti, kun kymmenet lukijat vierailivat sivuilla samanaikaisesti. Ei hyvä, joten tuunaamaan. [Read more…]

How to connect your WordPress blog to Facebook and Twitter

There’s of course dozens of ways of connecting your blog to Facebook and Twitter, but here’s a relatively easy method that works for me. What you need is a self-hosted WordPress blog – this recipe won’t work on WordPress.com hosted free blogs.

[Read more…]

WordPress plugin for Knowledge Building discussions

Our research group has been working with knowledge building for years now. Some may be familiar with the Fle3 learning environment, built back in 2001. We’ve tried to get someone to create a Moodle plugin for knowledge building, even with the help of a dozen polytechnic students, but without much success.

Hans Põldoja came visiting two weeks ago and said he wanted a knowledge building plugin for WordPress by “next Tuesday”. Well, that wasn’t going to happen, but since our group leader Teemu Leinonen ok’d that I could spend time doing this plugin, I overcame my disgust over the uglyness of PHP and went to work.

Now, after one week, and probably about 20 hours later I have:

  1. Set up SVN and Trac for the project
  2. Got a domain name: fle4.uiah.fi
  3. Taught myself how to create WordPress plugins, basically by looking at these resources:
  1. Writing a Plugin « WordPress Codex
  2. Plugin API « WordPress Codex
  3. Plugin API/Action Reference « WordPress Codex
  4. Plugin API/Filter Reference « WordPress Codex
  5. Option Reference « WordPress Codex
  6. Adding Administration Menus « WordPress Codex
  7. WordPress Coding Standards « WordPress Codex
  8. Inline Documentation « WordPress Codex
  9. Plugin Submission and Promotion « WordPress Codex
  10. I did take a look at a few other plugins that do something similar, but the code quality was so bad that they didn’t help that much.
  • I then tested the plugin on my WordPress site.
  • When I was happy with the result, I applied for hosting at the WordPress Plugin Directory.
  • I then copied my code to the provided Subversion location (where you can checkout the source code as well), waited for the plugin information to be updated, and presto, it was downloadable and installable from within WordPress plugin management screens.
  • Some findings and observations:

    • WordPress development documentation is excellent, and an invaluable resource!
    • Many WordPress plugins (despite the previous point) are of low quality. So if looking for code examples, think carefully what you use.
    • The WordPress API is in general very well made. The Actions and Filters hooks allow plugins to easily effect the places they need to change.
    • The API still has problems – some changes aren’t easy to make using hooks, and need to be manually inserted by editing templates.
    • Some WordPress code still has html and php mixed together (example: the Walker class), which make their extensions really painful.

    But yes, in about half a week of working time I have a functional plugin. You can find it:

    Comments and such about the plugin are welcome at the plugin site. More general comments are welcome here.

    Blogged with the Flock Browser

    Tags: wordpress, plugin, knowledgebuilding, php, development, api