• Resolved alordiel

    (@alordiel)


    Hello and thank you for the great plugin and the detailed documentation.

    I need something a bit specific for my case. I have posts with likes and i want the orderby to be focused on this meta_value, so the the results will be ordered by rating.
    My wp_postmeta has a meta_key => post_likes and meta_value => the numbers of the likes.
    Usually i would use :

    $args = array(
                'post_status' => 'publish',
                'post_type' => 'listing',
                'meta_key' => 'client_feedback_score',
                'orderby' => 'meta_value_num',
                'order' => 'DESC'
            );

    But as I added your search plugin (because I need more advanced options) I start wandering how to implement this code in yours. Have already spent few hours in reading your code but my knowledge is quite limited when it is about advanced WordPress/php code.

    Could you please give me any hint if I can do any modifications and how so i can manage the task with displaying the most liked posts first.

    Thanks in advanced.

    https://www.ads-software.com/plugins/search-filter/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter alordiel

    (@alordiel)

    Please disregard the question above. I found a way around of my problem.

    Plugin Author DesignsAndCode

    (@designsandcode)

    Hey thanks alordiel

    Would you mind telling me how you did it? Will probably help other users and could be something I’ll include in a future version of this plugin ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Is it possible to change the orderby option by 'likes'’ is closed to new replies.