Take the 2-minute tour ×
WordPress Development Stack Exchange 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

closed as off-topic by helgatheviking, s_ha_dum, toscho Nov 19 '13 at 2:50

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions should be specific to WordPress within defined scope (merely happening in its context, such as generic PHP/JS/HTML/CSS, is insufficient). Might be better asked at Stack Overflow or other appropriate site of Stack Exchange network." – helgatheviking, toscho
If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.