Upgrade DB Loop – WordPress DB Version Conflict

I’ve had this issue before. I stumbled on a really old article from Mark Jaquith on forcing an update. The plugin I’m linking to was originally made to update from 1.5.x to 2.0.x. I was in a bind so I gave it a shot. I did have recent back-ups for my DB so I wasn’t … Read more

Cloning blog to localhost via WAMP

You must change the parameters to connect to the database in the file wp-config.php in the root folder of your WordPress installation, or create the same user/password and database name for the database that you have created locally with WAMP. Note: You may have to change the blog_url and every url in the dump that … Read more

How not to display ALL items of a database

Check if excludecat is containing category IDs or category slugs, if it is using slugs/text then change the ID field to slug. Also define the relation to use, e.g.: ‘relation’ => ‘AND’, Here are the parameters: http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters

Export SQL query based on custom field?

Change your query to: SELECT wp_posts.* FROM wp_posts INNER JOIN wp_postmeta ON wp_postmeta.post_ID = wp_posts.ID WHERE ( wp_postmeta.meta_key = ‘Color’ AND wp_postmeta.meta_value IS NOT NULL ); That way it only gets the data in wp_posts, but still filters based on your criteria.

How can I query the db to access current post information?

The correct way: $my_query = new WP_Query(‘posts_per_page=2′); while ($my_query->have_posts()) : $my_query->the_post(); ?> <?php global $post; print_r($post); // <– this is your postStuff ?> <?php endwhile;?> <?php wp_reset_query(); ?> Normally, you dont’t need to globalize the post. There are helper functions that should be used instead to fetch information from the current post