Viewing 1 to 10 of 12 items
Archive | April, 2010

Delete Posts Revisions from Your Database

WordPress has a lot of good features and one of them is Post Revisions. This was included in WordPress 2.6, even though this is a good feature, it can cause some problems. One of them is increase the size of your database. Depending on how long it takes you to write a post, you might  Full Article…

0

Horizontal Two-Tiered Conditional Navigation

We’ll need code to help us: 1) query the page, 2) determine if there are child pages, and 3) properly highlight both the .current_page_parent and .current_page_item links. If you’re wondering why the CSS seems overly verbose, it’s to make sure the :active and :hover states display correctly whether or not subpages exist — if they  Full Article…

0

Get Posts With A Specific Custom Field & Value

Add the query_posts() function just before the Loop. Change the meta_key and meta_value accordingly. The example shown below will get posts with custom field “review_type” with value “movie”.

0

Get the root page ID

Get the ID of the root (oldest ancestor, parent without parents) page relative to the current page in a WordPress page template. Can be helpful for use with wp_list_pages() to create navigation markup.

0

Page Redirect Template

A handy little page template for making a page redirect to any url. To use save the code as redirect.php, upload to your theme directory, and then when making a page select “redirect” as your page template. Then just enter ONLY the url you want to redirect to in the body copy for that page.

0