Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

This is the function I want to call

function test() {
echo "test";
add_filter('loop_shop_per_page', create_function('$cols', 'return 24;'));
}

And I call it like this

<?php test() ?> 

So it shows me the "test" text but not make the "filter"

To be more specific, I want to show a dropdown with this options :10, 20, 30 so I can sort the list of products on a woocommerce site.

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.