Hot answers tagged

4

Since it is a performance question, you might be able to avoid using meta keys at all by storing/getting that data another way and not having to set a separate meta field to match with... a. You could get the year from the published $post->post_date... So that when doing the query just use the date argument: $args = array( 'post_type' => $...


3

There really is no sane way to accomplish this, specially if you have posts that are assigned to more than one tag (which is almost always the case). What is very sure, you have you work cut out for you. Here are some thought and ideas you can persue: POSTS WITH MULTIPLE TERMS If posts have more than one tag (or any term for that matter) assigned to them, ...


1

I did this for a client and it looked like this: The PHP code: <dl class="tree-accordion"> <?php $currentyear = date("Y"); $years = range($currentyear, 1950); foreach($years as $year) { ?> <dt><a href=""><i class="fa fa-fw fa-plus-square-o" aria-hidden="true"></i> <?php echo $year; ?></a&...



Only top voted, non community-wiki answers of a minimum length are eligible