I specified a custom database prefix when setting up my site, and My Post Order was giving an error when displaying posts. I had to patch it to support custom database prefixes.
In functions.php, mpo_change_condition()…
Add $wpdb to the list of global variables:
global $wp_query, $post_ids, $wpdb;
Use the database prefix when building a query:
$where .= ‘AND ‘ . $wpdb->prefix . ‘posts.ID IN (‘ . $post_ids . ‘)’;
- The topic ‘Doesn't work with database prefixes’ is closed to new replies.