how to query for meta_value have array

No, you can’t do that via a query. You can request everything then manually filter out items via PHP, but that would be slow. Instead, you need to address the root problem, that you’re storing serialised PHP data in a single field, rather than multiple fields, e.g. you should have an option1 meta key/value and … Read more

Search format not matching taxonomy query

Ok, the problem was with my radio buttons. <?php foreach( $regions as $region ) : ?> <label><input type=”radio” name=”region” value=”<?php echo $region->slug;?>” /><span><?php echo $region->name;?></span></input></label><br /> <?php endforeach;?> I have solved this problem by giving the radio buttons a name and value and not using any symbols in that name or value. It really was … Read more

option select form always deleting the sql query

Don’t tag your option as selected if you don’t want it selected, which means that you should probably be using selected() to dynamically select any value that has already been set. That should solve the problem. But this could be cleaned up a lot: esc_attr() accepts a single parameter. You are sending it two. It … Read more

Archive – Show Page Month Headers

I changed my approach in the end. I just called a single query and added the logic to check the date of the last post was in a different month: $today = date(“r”); $articledate = get_the_time(‘r’); $difference = round((strtotime($today) – strtotime($articledate))/(24*60*60),0); if ($month_sort == true && ($difference <= 7) && $current_week == null) { $vpost_count … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)