Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Sorting of Testimonials when in list mode to support Testimonial Data Field #28

Open
amallory opened this issue Oct 31, 2014 · 0 comments

Comments

@amallory
Copy link
Contributor

In the admin screen when editing a testimonial you can specify the order of the testimonials in a "Testimonial Data" field. It would be good to carry this through to the front end and allow ordering the list of testimonials on this field when using the shortcode.

This code can be used in the interim to accomplish this:
add_filter ('testimonials_in_page_args', 'testimonials_sort_testimonial_order_meta');
function testimonials_sort_testimonial_order_meta($filtercont) {
$filtercont['meta_key'] = 'ivycat_testimonial_order';
$filtercont['orderby'] = 'meta_value_num';
$filtercont['order'] = 'ASC';

return $filtercont;

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant