Wordpress version 2.5 upgrade

31 03 2008

image Two hours ago I upgraded Networknet.nl with Wordpress version 2.5 and immediately after the php binaries and database were upgraded I hit my first problem. Within my Widgets Design Sidebar I have the Pages widget which shows all pages on the right side of my blog starting with “About me”.. VMware. For some topics I created pages instead of Wordpress posts and linked those pages to a parent page; these two pages were excluded from “Pages Widget”. After the upgrade my pages widget become really huge showing 30+ pages. I did a search on Wordpress support site and someone else already reported this problem; no response yet except me on this post. 

I didn’t want to downgrade my new Wordpress version and therefore I used this method to query the parent pages and exclude them manually without doing the PHP code research how to exclude them.

  • Open phpmyadmin
  • Select your wordpress database
  • Open wp_posts and click SQL

image   

  • Paste this sql query

SELECT id
FROM ‘wp_posts’
WHERE ‘post_type’ = ‘page’
AND ‘post_parent’ NOT LIKE ‘0′

  • Click GO button and click Export; I export to CSV to excel and copied all cells into Notepad.

image

  • Paste these pages into the exclude for your pages widget.

Dirty solution but I solved my problem in less than 5 minutes for now…