I’m having trouble with WordPress tags. After creating a Tag and attaching the tag to a post the URL give me the following error:
Parse error: syntax error, unexpected end of file, expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) in /var/www/html/example.com/wp-content/themes/example/index.php on line 30
And here is the code for my index.php:
<?php
/*
Template Name: Blog Page
*/
get_header();
?>
<!-- PAGE LAYOUT //-->
<section id="page-title" style="background: url(<?php echo get_template_directory_uri().'/images/blog-title-bg.jpg'; ?>) no-repeat center top / cover;">
<div class="page-wrapper">
<h1>Our Blog</h1>
</div>
</section>
<div id="page" class="interior"<?php if(get_field('content_background')) : ?> style="background: url(<?php echo get_field('content_background'); ?>) no-repeat center top / 100% auto;"<? endif; ?>>
<div class="page-wrapper">
<main>
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<div class="blog-post">
<h3 class="title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<div class="meta">Posted: <?php echo get_the_time('F j, Y'); ?> | By: <?php the_author(); ?></div>
<p><?php the_excerpt(); ?></p>
<p align="right"><a href="<?php the_permalink(); ?>">» Read More</a></p>
</div>
<?php endwhile; else : ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>
</main>
</div>
<?php get_sidebar('testimonials'); ?>
</div>
<?php get_footer(); ?>
Please any guidance will be much appreciated. Thanks!