WordPress.org

Ready to get started?Download WordPress

Forums

My Post Order
[resolved] Doesn't work with database prefixes (3 posts)

  1. Dave Ross
    Member
    Posted 1 year ago #

    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 . ')';

    http://wordpress.org/extend/plugins/my-posts-order/

  2. Kapil Chugh
    Member
    Plugin Author

    Posted 1 year ago #

    Thank you. Will check it.

  3. Kapil Chugh
    Member
    Plugin Author

    Posted 1 year ago #

    Bug has been resolved in new version.

    Thanks again!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.