is_front_page problem
-
Either of these two conditions work by themselves, but when I put them in this if/else statement, I always receive an error:
Parse error: syntax error, unexpected ‘}’ in /public_html/timeline/wp-content/themes/timeline/index.php on line 65
The conditional is:
<?php if (is_front_page()) { ?> <?php $current_year = date('Y'); $args = array('category_name' => $current_year); $category_posts = new WP_Query($args); if($category_posts->have_posts()) : while($category_posts->have_posts()) : $category_posts->the_post(); ?> <?php } else { ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php } ?>
Is it because I’m putting PHP tags in PHP? I can’t make sense of it.
Thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘is_front_page problem’ is closed to new replies.