Tagged Questions
0
votes
0answers
27 views
Displaying posts by year
I'm trying to display posts on the homepage from the current year only. I am using the following:
<?php if ( is_front_page()) { ?>
<?php $current_year = date('Y'); ?>
<?php ...
0
votes
2answers
393 views
Wordpress loop: Display <div> if posts exist
In a single post template I am trying to output some header text in a <div> and display links to related posts in a <ul> if related posts exist (based on tags). If there are no posts, ...
1
vote
4answers
1k views
How to tell if $query_var isset?
I tired to use isset($queryvar) but that didnt work, so I implemented my own function qv_isset, but it runs into a problem when $ch is set to 0.
$cls = get_query_var('cls');
$ch = ...