i'm trying to create a wordpress theme from scratch and then test it on localhost. this code is from front-page.php
i keep getting this error:
Parse error: syntax error, unexpected end of file in C:\wamp\www\director\front-page.php on line 56
( line 56 is the last line of the code)
with this code:
<?php get_header(); ?>
<?php
$posts= get_posts(array('numberposts' => 4,'category' => 3, orderby => 'title'));
foreach ($posts as $post) : setup_postdata($post); ?>
<h3><?php the_title(); ?></h3>
<?php the_excerpt(); ?>
<?php endforeach; ?>
?>
<?php
$args= array('post_type' => 'businesses', 'posts_per_page' => 1, 'tax_query' => array(array('taxonomy' => 'business-type', 'field' => 'slug', 'terms' => 'featured')));
$featuredBusiness=get_posts($args);
foreach ($featuredBusiness as $post) : setup_postdata($post);
?>
<div id="featured" class="group">
<div class="business-info right-col">
<hr/>
<h3>Featured Business:</h3>
<h2><?php the_title(); ?></h2>
<p><?php the_excerpt(); ?></p>
</div>
<div class="impact-image">
<?php print get_the_post_thumbnail($post->ID, 'storefront'); ?>
</div>
</div>
<?php endforeach; ?>
<div id="main" class="group">
<div id="posts" class="left-col">
<?php
$posts= get_posts('posts_per_page=3');
foreach ($posts as $post) : setup_postdata($post); ?>
<div class="post group">
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<div class="byline">by <?php the_author_posts_link(); ?>
on <a href="<?php the_permalink(); ?>"><?php the_time('l F d, Y'); ?></a>
</div>
<p><?php the_excerpt(); ?></p>
</div>
<?php
$blogID=get_page_by_path('blog');
$blogLink=get_page_link($blogID->ID);
?>
<a class="visit" href=" <?php print $blogLink; ?>">Visit the Blog</a>
</div>
<?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>
i checked but i don't seem to be missing any closing tags or something. is there something i'm missing or not seeing?
get_footer()
function? – Paul Dessert Jun 18 at 6:37foreach
loop – Pieter Goosen Jun 18 at 6:41