• 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’)

    https://www.ads-software.com/plugins/latest-custom-post-type-updates/

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