I'm working with the ACF plugin in WordPress. For some reason the else statement is executing even when the first statement is true. Why?
<section id="ParksContainer" class="col-lg-6 col-md-6 col-xs-12">
<h1 id="AdventurePostTitle" class="">Parks</h1>
<?php if( have_rows('adventure_location') ):
while( have_rows('adventure_location') ): the_row(); ?>
<ul id="LocationUl">
<li><b>NATIONAL PARK:</b>
<?php if( the_sub_field('national_park') ):?>
<?php echo '<span class="LocationNameSpan">'; the_sub_field('national_park'); echo '</span>'; ?>
<?php else: ?>
<?php echo '<span class="LocationNameSpan">N/A</span>'; ?>
<?php endif; ?>
</li>
<li>
<b>STATE PARK:</b>
<?php if( the_sub_field('state_park') ) {
echo '<span class="LocationNameSpan">'; the_sub_field('state_park'); echo '</span>';
} else {
echo '<span class="LocationNameSpan">N/A</span>';
}
?>
</li>
</ul>
<?php endwhile; ?>
<?php endif; ?>
</section><!--Parks Container-->
Any suggestions?
Related
I have this bit of code that doesn't render on page. Does anybody know what the issue is?
<div class="b b--alt">
<div class="container">
<div class="tab-widget tab-widget--team js-tab-widget">
<?php if( have_rows('the_commusoft_story') ) { ?>
<?php $i = 0; ?>
<ul class="tab-widget__list">
<?php while( have_rows('the_commusoft_story') ): the_row(); ?>
<?php $i++ ?>
<li class="tab-widget__item">
<a href="#tab-panel-<?php echo $i; ?>" class="tab-widget__link">
<span class="ss-icon <?php the_sub_field('icon'); ?>"></span>
<h2><?php the_sub_field('section_title'); ?></h2>
<?php the_sub_field('section_description'); ?>
</a>
</li>
<?php endwhile; ?>
</ul>
<?php }; ?>
<?php if( have_rows('the_commusoft_story') ) { ?>
<?php $i = 0; ?>
<div class="tab-widget__tabs">
<?php while( have_rows('the_commusoft_story') ): the_row(); ?>
<?php $i++ ?>
<div class="tab-widget__tab-content">
<h2 id="tab-panel-<?php echo $i; ?>"><?php the_sub_field('section_title'); ?></h2>
<?php the_sub_field('content'); ?>
</div>
<?php endwhile; ?>
</div>
<?php }; ?>
</div>
</div>
</div>
SO on the page are two sections, the problem appears when I try to move it as second section and it disappears...
Any idea what is going on, and where the mistake is?
Thanks
Your code can definately be simplified. I've removed the extra IF statement - it's not required. I've also added line terminations to the $i++ operators:
<div class="b b--alt">
<div class="container">
<div class="tab-widget tab-widget--team js-tab-widget">
<?php if( have_rows('the_commusoft_story') ) : ?>
<?php $i = 0; ?>
<ul class="tab-widget__list">
<?php while( have_rows('the_commusoft_story') ): the_row(); ?>
<?php
$i++; // This starts at 1.
?>
<li class="tab-widget__item">
<a href="#tab-panel-<?php echo $i; ?>" class="tab-widget__link">
<span class="ss-icon <?php the_sub_field('icon'); ?>"></span>
<h2><?php the_sub_field('section_title'); ?></h2>
<?php the_sub_field('section_description'); ?>
</a>
</li>
<?php endwhile; ?>
</ul>
<?php $i = 0; ?>
<div class="tab-widget__tabs">
<?php while( have_rows('the_commusoft_story') ): the_row(); ?>
<?php
$i++;
?>
<div class="tab-widget__tab-content">
<h2 id="tab-panel-<?php echo $i; ?>"><?php the_sub_field('section_title'); ?></h2>
<?php the_sub_field('content'); ?>
</div>
<?php endwhile; ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
This, in theory, should be a working piece of code. So - if what I have written doesn't work for you; I'd advise checking for PHP errors, or possibly looking for CSS styling conflicts.
Keep us posted how you get on :)
I've suddenly had an issue with a site I run.
Yesterday, the Business Page template on my site stopped showing the_content() copy. I updated 4 plugins earlier in the day; Contact Form 7, Yoast SEO, Jetpack and Wordfence Security. I can't 100% link these as the reason for the issue, because I never noticed the missing content. It was reported by a user. However I know the content was displaying 2 days ago, for sure.
Either way, I individually deactivated all my plugins, but the content didn't reappear.
Below is the code for the page template:
<?php
get_header();
// Calculate the best link back
$taxonomy = reset(wp_get_post_terms( get_the_ID(), 'business' ));
$back_link = get_term_link( $taxonomy, 'business' );
?>
<?php $sidebar_class = ''; ?>
<?php if($background_image = ardee('business_header')) { ?>
<div class="business-header" style="background-image: url(<?php echo $background_image; ?>);">
<?php } else { ?>
<?php $sidebar_class .= ' business-sidebar-flush'; ?>
<div class="business-header business-header-missing">
<?php } ?>
<div class="container">
<div class="row">
< Back to Listings
</div>
</div>
</div>
<div class="container">
<div class="row business-wrapper">
<div class="business-main col-sm-7">
<h1 class="business-title"><?php the_title(); ?></h1>
<h5 class="business-subtitle"><?php echo ardee('business_address'); ?></h5>
<div class="business-content copy">
<?php the_content(); ?>
</div>
<?php if($gallery = ardee('business_gallery')) { ?>
<div class="box business-gallery">
<h4 class="box-title">Photos</h4>
<div class="modal-gallery business-gallery row">
<?php foreach($gallery as $image) { ?>
<div class="business-gallery-image col-sm-4">
<img src="<?php echo $image['sizes']['business-thumb']; ?>" class="img-responsive">
</div>
<?php } ?>
</div>
</div>
<?php } ?>
<?php if($facilities = ardee('facilities')) { ?>
<div class="box business-facilities">
<?php $facilities_title = ( ardee( 'facilities_title' ) ) ? ardee( 'facilities_title' ) : 'Facilities'; ?>
<h4 class="box-title"><?php echo $facilities_title; ?></h4>
<ul class="list-unstyled list-facilities copy">
<?php foreach($facilities as $facility) { ?>
<li><i class="fa fa-check"></i> <?php echo $facility['facility']; ?></li>
<?php } ?>
</ul>
</div>
<?php } ?>
<?php if( $documents = ardee('document_categories') ) { ?>
<?php foreach(ardee('document_categories') as $category) { ?>
<div class="box business-category">
<h4 class="box-title"><?php echo $category['title']; ?></h4>
<div class="business-files row">
<?php foreach($category['documents'] as $document) { ?>
<div class="business-gallery-image col-sm-4">
<span><?php echo $document['document_title']; ?>
</div>
<?php } ?>
</div>
</div>
<?php } ?>
<?php } ?>
</div>
<div class="business-aside col-sm-5">
<div class="business-sidebar <?php echo $sidebar_class; ?> box">
<?php if ( has_post_thumbnail() ) { ?>
<div class="business-logo-holder">
<?php the_post_thumbnail( 'business-logo', array( 'class' => 'business-logo img-responsive' ) ); ?>
</div>
<?php } ?>
<div class="business-information">
<?php if($meta = ardee('contact_number')) { ?>
<div class="business-details">
<i class="fa fa-phone t-blue"></i>
<strong><?php echo $meta; ?></strong>
</div>
<?php } ?>
<?php if($meta = ardee('business_address')) { ?>
<div class="business-details">
<i class="fa fa-home t-blue"></i>
<strong><?php echo $meta; ?></strong>
</div>
<?php } ?>
<?php if($meta = ardee('contact_email')) { ?>
<div class="business-details">
<i class="fa fa-envelope t-blue"></i>
<strong><?php echo encrypt_email($meta); ?></strong>
</div>
<?php } ?>
<?php if($meta = ardee('business_website')) { ?>
<div class="business-details">
<i class="fa fa-link t-blue"></i>
<strong><?php echo $meta; ?></strong>
</div>
<?php } ?>
<?php if($facebook = ardee('social_accounts', 'facebook_url') || $twitter = ardee('social_accounts', 'twitter_account')) { ?>
<div class="business-details business-social">
<strong>Social Profiles: </strong>
<?php if($facebook = ardee('social_accounts', 'facebook_url')) { ?><i class="fa fa-facebook-official"></i> <?php } ?>
<?php if($twitter = ardee('social_accounts', 'twitter_account')) { ?><i class="fa fa-twitter"></i><?php } ?>
</div>
<?php } ?>
</div>
<?php if($business_email = ardee('contact_email')) { ?>
<div class="business-contact">
<h4>Contact Business</h4>
<?php echo do_shortcode('[contact-form-7 id="4" title="Business Contact Form"]'); ?>
</div>
<?php } ?>
</div>
<?php $open_hours = reset( ardee( 'open_hours' ) ); ?>
<?php if( $open_hours['monday'] || $open_hours['tuesday'] || $open_hours['saturday'] || ardee( 'lunch_hours' ) ) { ?>
<div class="business-opening">
<h4>Opening Hours</h4>
<dl class="business-hours">
<?php if( $open_hours['monday'] || $open_hours['tuesday'] || $open_hours['saturday'] ) { ?>
<?php foreach($open_hours as $opening_day => $opening_hours) { ?>
<?php if($opening_hours) { ?>
<div class="business-timeslot <?php echo business_open_status($opening_day, $opening_hours); ?>">
<span class="pull-right"><?php echo $opening_hours; ?></span>
<?php echo ucwords($opening_day); ?>
</div>
<?php } ?>
<?php } ?>
<?php } ?>
<?php if( ardee( 'lunch_hours' ) ) { ?>
<?php foreach(ardee('lunch_hours') as $opening) { ?>
<?php if($opening_hours['time']) { ?>
<div class="business-timeslot t-red">
<span class="pull-right"><?php echo $opening['time']; ?></span>
<?php echo $opening['title']; ?>
</div>
<?php } ?>
<?php } ?>
<?php } ?>
</dl>
</div>
<?php } ?>
</div>
</div>
</div>
<?php get_footer(); ?>
Anyone spot any glaring issues? I should stress that I didn't edit this in any way prior to the issue.
The content appears fine on all other templates, it is only this one that has the issue, but it's a very important page.
You can view one of the affected pages directly here: http://goo.gl/8L0kNU
I think the issue is you used the_content(); without loop and without loop they can't get the content of page. Use below code and write your code in between them and then check.
<?php
while ( have_posts() ) : the_post();
// Write your code here
endwhile;
?>
I am putting together my graphic design/portfolio blog using Wordpress theme 'Salient', I am having a problem with a setting within the theme which controls the layout of a blog post page (single.php), I have little experience with php and am hoping someone could tell me of a simple solution or rework my single.php file to display the way I want it.
I want my blog post page to look like this:
http://www.ravagedesign.com/freebies/greylime-hd-launcher-theme-icon-pack-released/
The blog-title/date/category & social icons are listed below the large feature graphic, I have achieved this by using a slider plugin however this isnt an option long term as I would end up with a huge list on my plugin and this also has a significantly slower page load time.
I dont want it to look like this:
http://www.ravagedesign.com/freebies/greyice-hd-launcher-theme-icon-pack-released/
The blog-title/date/category & social icons are placed inside the feature graphic, this post was made using more conventional methods built into the theme which incorporate the large feature graphic into each individual post.
Is there a modification I can make to my single.php file to use the feature graphic within the post options while placing all info below the feature graphic like the first page.
my single.php file (salient theme):
<?php get_header(); ?>
<?php
global $nectar_theme_skin, $options;
$bg = get_post_meta($post->ID, '_nectar_header_bg', true);
$bg_color = get_post_meta($post->ID, '_nectar_header_bg_color', true);
$fullscreen_header = (!empty($options['blog_header_type']) && $options['blog_header_type'] == 'fullscreen' && is_singular('post')) ? true : false;
$fullscreen_class = ($fullscreen_header == true) ? "fullscreen-header full-width-content" : null;
$theme_skin = (!empty($options['theme-skin']) && $options['theme-skin'] == 'ascend') ? 'ascend' : 'default';
$hide_sidebar = (!empty($options['blog_hide_sidebar'])) ? $options['blog_hide_sidebar'] : '0';
$blog_type = $options['blog_type'];
if(have_posts()) : while(have_posts()) : the_post();
nectar_page_header($post->ID);
endwhile; endif;
if($fullscreen_header == true) {
if(empty($bg) && empty($bg_color)) { ?>
<div class="not-loaded default-blog-title fullscreen-header" id="page-header-bg" data-alignment="center" data-parallax="0" data-height="450" style="height: 450px;">
<div class="container">
<div class="row">
<div class="col span_6 section-title blog-title">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="author-section">
<span class="meta-author vcard author">
<?php if (function_exists('get_avatar')) { echo get_avatar( get_the_author_meta('email'), 100 ); }?>
</span>
<div class="avatar-post-info">
<span class="fn"><?php the_author_posts_link(); ?></span>
<span class="meta-date date updated"><i><?php echo get_the_date(); ?></i></span>
</div>
</div>
</div>
</div>
</div>
<i class="icon-salient-down-arrow icon-default-style"> </i>
</div>
<?php }
if($theme_skin != 'ascend') { ?>
<div class="container">
<div id="single-below-header" class="<?php echo $fullscreen_class; ?> custom-skip">
<span class="meta-share-count"><i class="icon-default-style steadysets-icon-share"></i> <?php echo '<span class="share-count-total">0</span> <span class="plural">'. __('Shares',NECTAR_THEME_NAME) . '</span> <span class="singular">'. __('Share',NECTAR_THEME_NAME) .'</span>'; nectar_blog_social_sharing(); ?> </span>
<span class="meta-category"><i class="icon-default-style steadysets-icon-book2"></i> <?php the_category(', '); ?></span>
<span class="meta-comment-count"><i class="icon-default-style steadysets-icon-chat-3"></i> <?php comments_number( __('No Comments', NECTAR_THEME_NAME), __('One Comment ', NECTAR_THEME_NAME), __('% Comments', NECTAR_THEME_NAME) ); ?></span>
</div><!--/single-below-header-->
</div>
<?php }
} ?>
<div class="container-wrap <?php echo ($fullscreen_header == true) ? 'fullscreen-blog-header': null; ?> <?php if($blog_type == 'std-blog-fullwidth' || $hide_sidebar == '1') echo 'no-sidebar'; ?>">
<div class="container main-content">
<?php if(get_post_format() != 'quote' && get_post_format() != 'status' && get_post_format() != 'aside') { ?>
<?php if(have_posts()) : while(have_posts()) : the_post();
if((empty($bg) && empty($bg_color)) && $fullscreen_header != true) { ?>
<div class="row heading-title">
<div class="col span_12 section-title blog-title">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div id="single-below-header">
<span class="meta-author vcard author"><span class="fn"><?php echo __('By', NECTAR_THEME_NAME); ?> <?php the_author_posts_link(); ?></span></span>
<?php if( !empty($options['blog_social']) && $options['blog_social'] == 1) { ?>
<span class="meta-date date updated"><?php echo get_the_date(); ?></span>
<?php } ?>
<span class="meta-category"><?php the_category(', '); ?></span>
<span class="meta-comment-count"><?php comments_number( __('No Comments', NECTAR_THEME_NAME), __('One Comment ', NECTAR_THEME_NAME), __('% Comments', NECTAR_THEME_NAME) ); ?></span>
</ul><!--project-additional-->
</div><!--/single-below-header-->
<div id="single-meta" data-sharing="<?php echo ( !empty($options['blog_social']) && $options['blog_social'] == 1 ) ? '1' : '0'; ?>">
<ul>
<?php if( empty($options['blog_social']) || $options['blog_social'] == 0 ) { ?>
<li>
<?php echo '<span class="n-shortcode">'.nectar_love('return').'</span>'; ?>
</li>
<li>
<?php echo get_the_date(); ?>
</li>
<?php } ?>
</ul>
<?php nectar_blog_social_sharing(); ?>
</div><!--/single-meta-->
</div><!--/section-title-->
</div><!--/row-->
<?php }
endwhile; endif; ?>
<?php } ?>
<div class="row">
<?php $options = get_option('salient');
global $options;
if($blog_type == 'std-blog-fullwidth' || $hide_sidebar == '1'){
echo '<div id="post-area" class="col span_12 col_last">';
} else {
echo '<div id="post-area" class="col span_9">';
}
if(have_posts()) : while(have_posts()) : the_post();
if ( floatval(get_bloginfo('version')) < "3.6" ) {
//old post formats before they got built into the core
get_template_part( 'includes/post-templates-pre-3-6/entry', get_post_format() );
} else {
//WP 3.6+ post formats
get_template_part( 'includes/post-templates/entry', get_post_format() );
}
endwhile; endif;
wp_link_pages();
$options = get_option('salient');
if($theme_skin != 'ascend') {
if( !empty($options['author_bio']) && $options['author_bio'] == true){
$grav_size = 80;
$fw_class = null;
?>
<div id="author-bio" class="<?php echo $fw_class; ?>">
<div class="span_12">
<?php if (function_exists('get_avatar')) { echo get_avatar( get_the_author_meta('email'), $grav_size ); }?>
<div id="author-info">
<h3><span><?php if(!empty($options['theme-skin']) && $options['theme-skin'] == 'ascend') { _e('Author', NECTAR_THEME_NAME); } else { _e('About', NECTAR_THEME_NAME); } ?></span> <?php the_author(); ?></h3>
<p><?php the_author_meta('description'); ?></p>
</div>
<?php if(!empty($options['theme-skin']) && $options['theme-skin'] == 'ascend'){ echo ' '. __("More posts by",NECTAR_THEME_NAME) . ' ' .get_the_author().' '; } ?>
<div class="clear"></div>
</div>
</div>
<?php } ?>
<div class="comments-section">
<?php comments_template(); ?>
</div>
<?php } ?>
</div><!--/span_9-->
<?php if($blog_type != 'std-blog-fullwidth' && $hide_sidebar != '1') { ?>
<div id="sidebar" class="col span_3 col_last">
<?php get_sidebar(); ?>
</div><!--/sidebar-->
<?php } ?>
</div><!--/row-->
<!--ascend only author/comment positioning-->
<div class="row">
<?php if($theme_skin == 'ascend' && $fullscreen_header == true) { ?>
<div id="single-below-header" class="<?php echo $fullscreen_class; ?> custom-skip">
<span class="meta-share-count"><i class="icon-default-style steadysets-icon-share"></i> <?php echo '<span class="share-count-total">0</span> <span class="plural">'. __('Shares',NECTAR_THEME_NAME) . '</span> <span class="singular">'. __('Share',NECTAR_THEME_NAME) .'</span> '; nectar_blog_social_sharing(); ?> </span>
<span class="meta-category"><i class="icon-default-style steadysets-icon-book2"></i> <?php the_category(', '); ?></span>
<span class="meta-comment-count"><i class="icon-default-style steadysets-icon-chat-3"></i> <a class="comments-link" href="<?php comments_link(); ?>"><?php comments_number( __('No Comments', NECTAR_THEME_NAME), __('One Comment ', NECTAR_THEME_NAME), __('% Comments', NECTAR_THEME_NAME) ); ?></a></span>
</div><!--/single-below-header-->
<?php }
if($theme_skin == 'ascend') nectar_next_post_display(); ?>
<?php if( !empty($options['author_bio']) && $options['author_bio'] == true && $theme_skin == 'ascend'){
$grav_size = 80;
$fw_class = 'full-width-section ';
$next_post = get_previous_post();
$next_post_button = (!empty($options['blog_next_post_link']) && $options['blog_next_post_link'] == '1') ? 'on' : 'off';
?>
<div id="author-bio" class="<?php echo $fw_class; if(empty($next_post) || $next_post_button == 'off' || $fullscreen_header == false && $next_post_button == 'off') echo 'no-pagination'; ?>">
<div class="span_12">
<?php if (function_exists('get_avatar')) { echo get_avatar( get_the_author_meta('email'), $grav_size ); }?>
<div id="author-info">
<h3><span><?php if(!empty($options['theme-skin']) && $options['theme-skin'] == 'ascend') { echo '<i>' . __('Author', NECTAR_THEME_NAME) . '</i>'; } else { _e('About', NECTAR_THEME_NAME); } ?></span> <?php the_author(); ?></h3>
<p><?php the_author_meta('description'); ?></p>
</div>
<?php if(!empty($options['theme-skin']) && $options['theme-skin'] == 'ascend'){ echo '' . __("More posts by",NECTAR_THEME_NAME) . ' ' . get_the_author().' '; } ?>
<div class="clear"></div>
</div>
</div>
<?php } ?>
<?php if($theme_skin == 'ascend') { ?>
<div class="comments-section">
<?php comments_template(); ?>
</div>
<?php } ?>
</div>
<?php if($theme_skin != 'ascend') nectar_next_post_display(); ?>
</div><!--/container-->
</div><!--/container-wrap-->
<?php get_footer(); ?>
Any help is greatly appreciated.
you can use plugin : https://wordpress.org/plugins/custom-post-template/
and now u have to copy the single.php and make another template suppose u named it blog.php then add this to top of ur file:
<?php
/** blog.php
*
* The Template for displaying all Blog posts.
*
* Template Name Posts: Blog Page
*/
get_header(); ?>
now copy your content-single.php and named it content-blog.php
and make all the changes in layout here in these two custom files.
make sure that when u change the template then u have to call the content-blog in place of content single in ur blog.php file template.
ex:
while ( have_posts() ) {
the_post();
get_template_part( '/partials/content', 'blog' );
comments_template();
} ?>
New to PHP. Below is the code to show posts and pagination. I'm trying to get 10 posts per page to show and am confused on what code to write to do this. I tried changing Reading Settings to 10 blog posts, but when I save it, it overwrites back to one. So I figured the setting is being overwritten in php somewhere. I'm looking to overwrite that here. Please help.
I tried adding:
but not only does 10 posts show, so does a second category list below the posts.
<?php get_template_part('templates/page', 'header'); ?>
<?php if (!have_posts()) : ?>
<div class="alert">
<?php _e('Sorry, no results were found.', 'roots'); ?>
</div>
<?php get_search_form(); ?>
<?php endif; ?>
<?php $i = 0; ?>
<?php while (have_posts()) : the_post(); $i++; ?>
<article class="<?php $allClasses = get_post_class(); foreach ($allClasses as $class) { echo $class . " "; } if($i&1) { echo 'odd';} else {echo 'even';}; ?> block clearfix">
<?php get_template_part('templates/content-category', get_post_format()); ?>
</article>
<?php endwhile; ?>
<?php if ($wp_query->max_num_pages > 1) : ?>
<nav class="post-nav">
<ul class="pager">
<li class="previous"><?php next_posts_link(__('← Older posts', 'roots')); ?></li>
<li class="next"><?php previous_posts_link(__('Newer posts →', 'roots')); ?></li>
</ul>
</nav>
<?php endif; ?>
try adding this to your functions.php
function trance_posts_per_page( $query ) {
if (! is_main_query())
return;
$query->set( 'posts_per_page', 20 );
}
add_action( 'pre_get_posts', 'trance_posts_per_page' );
check the plugin WP-PageNavi if this doesn't help you
Got to work by removing this:
<?php $i = 0; ?>
<?php while (have_posts()) : the_post(); $i++; ?>
<article class="<?php $allClasses = get_post_class(); foreach ($allClasses as $class) { echo $class . " "; } if($i&1) { echo 'odd';} else {echo 'even';}; ?> block clearfix">
<?php get_template_part('templates/content-category', get_post_format()); ?>
</article>
<?php endwhile; ?>
and replacing it with this:
<?php query_posts( $query_string . '&posts_per_page=-10' );?>
<?php while (have_posts()) : the_post(); ?>
<article class="block clearfix">
<?php get_template_part('templates/contentcategory',
get_post_format()); ?>
</article>
<br />
<?php endwhile; ?>
I am getting the following error message when I try to access one of the links on the blog on my Wordpress site:
Parse error: syntax error, unexpected T_STRING in /home/insuranc/public_html/wp-content/themes/inovado/single.php on line 118
<?php get_header(); ?>
<!-- Title Bar -->
<?php if ( $data['select_blogtitlebar'] == 'Image' ) { ?>
<div id="alt-title" class="post-thumbnail" style="background-image: url( <?php echo $data['media_blogtitlebar']; ?> );">
<div class="grid"></div>
<div class="container">
<h1><?php echo $data['text_blogtitle']; ?><?php if($data['text_titledivider'] != "") { echo $data['text_titledivider']; } ?></h1>
<?php if($data['text_blogsubtitle']){ echo '<h2>'.$data['text_blogsubtitle'].'</h2>'; } ?>
</div>
</div>
<?php if($data['check_blogbreadcrumbs'] == 0){ ?>
<div id="alt-breadcrumbs">
<div class="container">
<?php minti_breadcrumbs(); ?>
</div>
</div>
<?php } ?>
<?php if($data['check_stripedborder']) { ?><div class="hr-border"></div><?php } ?>
<?php } elseif ($data['select_blogtitlebar'] == 'No Titlebar') { ?>
<?php if($data['check_blogbreadcrumbs'] == 0){ ?>
<div id="no-title">
<div class="container">
<div id="breadcrumbs" class="sixteen columns <?php if(get_post_meta( get_option('page_for_posts'), 'minti_subtitle', true )){ echo 'breadrcumbpadding'; } /* to align middle */ ?>">
<?php minti_breadcrumbs(); ?>
</div>
</div>
</div>
<?php if($data['check_stripedborder']) { ?><div class="hr-border"></div><?php } ?>
<?php } else { ?>
<div id="no-title-divider"></div>
<?php if($data['check_stripedborder']) { ?><div class="hr-border"></div><?php } ?>
<?php } ?>
<?php } else { ?>
<div id="title">
<div class="container">
<div class="ten columns">
<h1><?php echo $data['text_blogtitle']; ?><?php if($data['text_titledivider'] != "") { echo $data['text_titledivider']; } ?></h1>
<?php if($data['text_blogsubtitle']){ echo '<h2>'.$data['text_blogsubtitle'].'</h2>'; } ?>
</div>
<?php if($data['check_blogbreadcrumbs'] == 0){ ?>
<div id="breadcrumbs" class="six columns <?php if($data['text_blogsubtitle']){ echo 'breadrcumbpadding'; } /* to align middle */ ?>">
<?php minti_breadcrumbs(); ?>
</div>
<?php } ?>
</div>
</div>
<?php if($data['check_stripedborder']) { ?><div class="hr-border"></div><?php } ?>
<?php } ?>
<!-- End: Title Bar -->
<div id="page-wrap" class="container">
<div id="content" class="<?php echo $data['select_blogsidebar']; ?> twelve columns single">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php get_template_part( 'framework/inc/post-format/single', get_post_format() ); ?>
<?php if($data['check_sharebox'] == true) { ?>
<?php get_template_part( 'framework/inc/sharebox' ); ?>
<?php } ?>
<?php if($data['check_authorinfo'] == true) { ?>
<div id="author-info" class="clearfix">
<div class="author-image">
<?php echo get_avatar( get_the_author_meta('user_email'), '35', '' ); ?>
</div>
<div class="author-bio">
<h4><?php _e('About the Author', 'minti'); ?></h4>
<?php the_author_meta('description'); ?>
</div>
</div>
<?php } ?>
<?php if($data['check_relatedposts'] == true) { ?>
<div id="related-posts">
<?php
//for use in the loop, list 5 post titles related to first tag on current post
$tags = wp_get_post_tags($post->ID);
if ($tags) {
?>
<h3 class="title"><span><?php _e('Related Posts', 'minti'); ?></span></h3>
<ul>
<?php $first_tag = $tags[0]->term_id;
$args=array(
'tag__in' => array($first_tag),
'post__not_in' => array($post->ID),
'showposts'=>3
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<li><?php the_title(); ?> <span>(<?php the_time(get_option('date_format')); ?>)</span></li>
<?php
endwhile;
wp_reset_query();
}
}
?>
</ul>
</div>
<?php } ?>
<div class="comments"><? php comments_template(); ?></div>
<div class="post-navigation">
<div class="alignleft prev"><?php previous_post_link('%link', 'Prev Post', FALSE); ?></div>
<div class="alignright next"><?php next_post_link('%link', 'Next Post', FALSE); ?> </div>
</div>
<?php endwhile; endif; ?>
</div>
<?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>
There is a space between the <? and the php .. Remove it on Line 118
<? php comments_template(); ?></div>.
^----- Remove this.