Networknet.nl Blog
Stay Connected
Mar 31st
Posted by Ivan Versluis in OpenSource
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.
<p>SELECT id<br>FROM 'wp_posts'<br>WHERE 'post_type' = 'page'<br>AND 'post_parent' NOT LIKE '0' </p>
Dirty solution but I solved my problem in less than 5 minutes for now…