Querying multiple meta_keys in WordPress SQL query

WordPress Provides a native functions to query these kind of things very easily like WP_User_Query $args = array( ‘meta_query’ => array( ‘relation’ => ‘AND’, array( ‘key’ => $meta_key1, ‘value’ => $search1, ‘compare’ => ‘LIKE’ ), array( ‘key’ => $meta_key2, ‘value’ => $search2, ‘compare’ => ‘=’ ) ) ); $user_query = new WP_User_Query( $args );

WordPress Database Charset/Collate

There are $wpdb->charset and $wpdb->collate. I am not sure if or when one of these values might be empty, so it is better to prepare for empty values … From my DB class: /** * Get table charset and collation. * * @since 2012.10.22 * @return string */ protected static function get_wp_charset_collate() { global $wpdb; … Read more

How to change images size after theme modification?

To change values inside the content can you search/replace in the database, but it is hard to update all values, if the values are different. For a search/replace can you use a plugin or helper. The helper is very good for all ToDos in Search/Replace context. The plugin is useful for search/replace in different tables.

WP Posts Not Adding Up

Definitely time for an upgrade. 🙂 Try logging into your admin and following the link below. Just make sure to change ‘yoururl.com’ to whatever your website name is. If you have posts in the trash, that should take you to your trash to see them. http://yoururl.com/wp-admin/edit.php?post_status=trash&post_type=post