Wordpress Integration
I’ve been wanting to beef up the blog section of this site with a proper administration area for publishing entries, allow for comments, backtrack urls, rss/atom feeds, etc. I finally got around doing it by integrating an already existing package. The challange was to integrate the blog package with my existing code with minimum modifications to the package so that upgrades can be done without major problems later on. I played around with Movable Type but it didn’t quite allowed me to do what I wanted. After a bit of research, I noticed several bloggers are moving away from Movable Type to Wordpress. Wordpress is an open source, php based, MySQL back-end blogging system which is freely distributed under the GPL. The administrative tools are great with the exception of a few quirks like not being able to edit existing users and lack of page navigation on the posts listing. I was able to integrate Wordpress’ front-end with almost no modification to the code itself other than some css and adding one or two php lines. The Wordpress code itself is bit messy and not very well organized but it does the job for now.
Go Wordpress!
I wanted paged navigation too, and was curious about the option in the admin section Options->reading->front page. The drop down box has a selection called “Posts paged”.
I selected this, but it made no difference (Im using and older version, maybe 1.3, or 4?) It looks like the function has been written, but its just not on the front page. I had to add this line (I put it in a div) in my index.php file just after the foreach that spits out all the posts:
posts_nav_link("::", "newer posts", "older posts" );And it works like a charm (check my site!)
Yah, I see what you are saying. Although I was referring to the administration’s area listing
. There is a new version of wordpress out (1.5) which might have fixed this little issue, I should upgrade soon..
ah, sorry.
I had a look at the back end, and though the pagination works throught the querystring (ie, you can put /edit.php?paged=2 and it’ll show the 2nd page of results) the function call from the front end (posts_nav_link()) ALMOST works properly, but it puts the link to the wrong directory – it points the next/previous links to /edit.php?paged=2 instead of /wp-admin/edit.php?paged=2.
Looks like a bug really. Shouldn’t be too hard to fix. if you reeally wanted
Yah, I know it’s not hard, it’s quite simple really but I prefer to touch wordpress’s code as little as possible to be able to upgrade easier. If they haven’t fixed it in the new version maybe I will fix it an submit it as a patch though