WordPress.org

Support

Support » Plugins and Hacks » Latest Custom Post Type Updates » Plugin is missing some code for ordering by meta_key

Plugin is missing some code for ordering by meta_key

  • I added some lines into your code to fix the orderby meta_key feature.
    around line 45 in index.php I added:
    $instance[‘meta_key’] = addslashes(strip_tags($new_instance[‘meta_key’]));
    AND then around line 100 you had the wrong key for the “order_by” index

    I changed to this:
    if(($instance[‘orderby’] == ‘meta_value’ || $instance[‘orderby’] == ‘meta_value_num’)

    http://wordpress.org/plugins/latest-custom-post-type-updates/

  • The topic ‘Plugin is missing some code for ordering by meta_key’ is closed to new replies.
Skip to toolbar