WordPress.org

Ready to get started?Download WordPress

Forums

Latest Custom Post Type Updates
Plugin is missing some code for ordering by meta_key (1 post)

  1. mmx0
    Member
    Posted 1 year ago #

    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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.