Filter categories of posts with checkboxes

I was able to solve this by using Ajax. First I’ve changed my query args: $args = array( ‘post_type’ => ‘html5-blank’, ‘posts_per_page’ => 5, ‘paged’ => $paged, ‘category_name’ => get_query_var(‘category_name’) ); Then I made template where my content would change by injecting it with Ajax like this: var $vbPosts = $(‘#vb-posts’); var videoCats = { … Read more

Calculations in functions.php [closed]

On those lines get_post_meta() will return an array because by default the third argument of get_post_meta() is false. If you want to return a single value you should call it like so: get_post_meta( get_the_ID(), ‘invoice_service_amount’, true ); Additionally, you may want to get the post meta first and then ensure you have a value (wrapping … Read more

is_page “range” for if statement?

I think you should create range as variable and set it to is_page() something like this should work. $range = range(310, 326); if(is_page($range)){ // your code.. } is_page() function can accept array as argument. And range() function return array. This example works fine for me.