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;
?>
Related
i have the content function at the end of this code that must show something under the posts and it shows in the single page (post details page)
but in the home just shows nothing at all
here is my code
<?php
/**
* The template for content.
*
* #package Webdoone
* #subpackage Ruby
* #since Ruby 1.1
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class('wow fadeInUp'); ?>>
<?php if (has_post_format('gallery')) { ?>
<?php $images = get_post_meta($post->ID, '_format_gallery_images', true); ?>
<?php
if ($images) { ?>
<div class="post-img">
<div class="post-type-icon">
<i class="fa fa-picture-o"></i>
</div>
<div class="outter"><div class="inner">
<ul class="bxslider">
<?php
foreach ($images as $image) {
if ((get_theme_mod('ruby_webdoone_home_layout_settings') === 'home-ful' ) || (get_theme_mod('ruby_webdoone_archive_layout_settings') === 'arch-ful' ) || (get_theme_mod('ruby_webdoone_post_layout_settings') === 'post-ful' )) {
$the_image = wp_get_attachment_image_src($image, 'ruby_webdoone_custom_width');
$the_caption = get_post_field('post_excerpt', $image); ?>
<li><img src="<?php echo esc_url($the_image[0]); ?>"
<?php
if ($the_caption) {?>
title="<?php echo esc_attr($the_caption); ?>"<?php
}; ?> /></li><?php
} else {
$the_image = wp_get_attachment_image_src($image, 'ruby_webdoone_full_width');
$the_caption = get_post_field('post_excerpt', $image); ?>
<li><img src="<?php echo esc_url($the_image[0]); ?>"
<?php
if ($the_caption) { ?>
title="<?php echo esc_attr($the_caption); ?>"<?php
}; ?> /></li><?php
};
}; ?>
</ul>
</div></div>
</div><?php
}
} elseif (has_post_format('video')) { ?>
<div class="post-img video">
<div class="post-type-icon">
<i class="fa fa-video-camera"></i>
</div>
<div class="outter"><div class="inner">
<div class="fluid-width-video-wrapper" >
<?php $ruby_video = get_post_meta($post->ID, '_format_video_embed', true); ?>
<?php
echo $ruby_video;
?>
</div></div></div>
</div><?php
} elseif (has_post_format('audio')) { ?>
<div class="post-img audio">
<div class="post-type-icon">
<i class="fa fa-music"></i>
</div>
<?php $ruby_audio = get_post_meta($post->ID, '_format_audio_embed', true); ?>
<?php
if (wp_oembed_get($ruby_audio)) {
echo wp_oembed_get($ruby_audio);
} else {
echo esc_url($ruby_audio);
}; ?>
</div><?php
} else {
if (has_post_thumbnail()) { ?>
<div class="post-img">
<?php if (is_sticky()) { ?>
<div class="post-type-icon">
<i class="fa fa-thumb-tack"></i>
</div>
<?php } else { ?>
<div class="post-type-icon">
<i class="fa fa-pencil"></i>
</div>
<?php }
if (is_home()) {
if (!empty($_GET['layout'])) {
$layout = $_GET['layout'];
} else {
$layout = '';
};
if ((get_theme_mod('ruby_webdoone_home_layout_settings') === 'home-ful') || ($layout === 'home-ful')) { ?>
<div class="outter"><div class="inner">
<div class="grid home-full-thumb"><figure class="effect-jazz"><?php the_post_thumbnail('ruby_webdoone_full_width'); ?><figcaption></figcaption></figure></div> </div></div><?php
} else { ?>
<div class="outter"><div class="inner">
<div class="grid home-post-thumb"><figure class="effect-jazz"><?php the_post_thumbnail('ruby_webdoone_content_width'); ?><figcaption></figcaption></figure></div>
</div></div>
<?php
};
} elseif (is_single()) {
if (!empty($_GET['layout'])) {
$layout = $_GET['layout'];
} else {
$layout = '';
};
if ((get_theme_mod('ruby_webdoone_post_layout_settings') === 'post-ful') || ($layout === 'post-ful')) {
?>
<div class="outter"><div class="inner">
<?php the_post_thumbnail('ruby_webdoone_full_width'); ?>
</div></div>
<?php
} else {
?>
<div class="outter"><div class="inner">
<?php the_post_thumbnail('ruby_webdoone_content_width');?>
</div></div>
<?php
};
} else {
if (!empty($_GET['layout'])) {
$layout = $_GET['layout'];
} else {
$layout = '';
};
if ((get_theme_mod('ruby_webdoone_archive_layout_settings') === 'arch-ful') || ($layout === 'arch-ful')) { ?>
<div class="outter"><div class="inner">
<?php the_post_thumbnail('ruby_webdoone_full_width'); ?>
</div></div>
<?php
} else { ?>
<div class="outter"><div class="inner">
<?php the_post_thumbnail('ruby_webdoone_content_width'); ?>
</div></div>
<?php
};
};?>
</div><?php
};
}; ?>
<div class="post-header">
<?php
if (is_home()) { ?>
<h3><a class="pos-header-title-link" href="<?php esc_url(the_permalink()); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3><?php
} elseif (is_single()) { ?>
<h1 class="pos-header-title-link"><?php the_title(); ?></h1><?php
} else { ?>
<h2><a class="pos-header-title-link" href="<?php esc_url(the_permalink()); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2><?php
} ?>
<div class="post-info">
<span class="author"><?php esc_html_e('Author:', 'ruby') ?> <?php the_author_posts_link(); ?> \ </span>
<span class="date"><?php the_time(get_option('date_format')); ?> \ </span><span class="cat"><?php the_category(', '); ?></span>
<span class="comments-count">\ <?php printf( _nx( '1 Comment', '%1$s Comments', get_comments_number(), 'comments number', 'ruby' ), number_format_i18n( get_comments_number() ) ); ?></span>
</div>
</div>
<div class="post-data" itemprop="articleBody"><?php
the_content();
?> </div>
</article>
<?php wp_reset_postdata();
?>
how can i fix this ?
actually content must show this pictures section under posts and text or etc have no problem when i remove this func , wordpress wont show the like and other buttons under the posts .
please try this according to wp documentation
// Declare global $more (before the loop).
global $more;
// Set (inside the loop) to display all content, including text below more.
$more = 1;
the_content();
the_content does not work outside of "The Loop"
https://wordpress.stackexchange.com/a/44153/54343
edit: something akin to this is "the Loop"
<?php
if (have_posts()) {
while (have_posts()) {
the_post();
the_content();
}
}
?>
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 am using an Image Gallery in Custom Post Type on my WordPress Website. The Plugin I am using for that is Advanced Custom Fields. There is some error, due to which image gallery is not getting displayed on frontend.
Please check the page.
http://divinepower.co.in/cof/projects/residential/surrey-hills-vic/
Though the same code is working fine on another custom post type.
http://divinepower.co.in/cof/brands/gloster/asta/
The code I am using is
<?php get_header(); ?>
<div id="content">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php
// Show the Gallery
if( have_rows('gallery_slideshow') ):
echo '<div class="projects-gallery-wrap">';
echo '<div class="projects-gallery">';
// loop through the rows of data
while ( have_rows('gallery_slideshow') ) : the_row();
$imgObj = get_sub_field('image', $post->ID);
echo '<img class="item" src="'.$imgObj[sizes]['projects-gallery'].'" alt="'.$imgObj[alt].'"/>';
endwhile;
echo '</div>';
echo '</div>';
endif;
?>
<div id="inner-content" class="wrap cf">
<main id="main" class="main-content" role="main" itemscope itemprop="mainContentOfPage" itemtype="http://schema.org/Blog">
<div class="gallery-controls">
<button class="prev"><i class="fa fa-chevron-left"></i></button>
<button class="next"><i class="fa fa-chevron-right"></i></button>
</div>
<article id="post-<?php the_ID(); ?>" <?php post_class('cf'); ?> role="article" itemscope itemtype="http://schema.org/BlogPosting">
<?php
$currentBrandName = cosh_get_brand_name();
$currentBrandSlug = cosh_get_brand_slug();
?>
<div class="content">
<header class="article-header">
<div class="title-wrap">
<h1 class="entry-title single-title" itemprop="headline"><?php the_title(); ?></h1>
<?php
// Brand Image
print apply_filters( 'taxonomy-images-list-the-terms', '', array(
'before' => '<ul class="projects-logos">',
'after' => '</ul>',
'image_size' => 'full',
'taxonomy' => 'brand'
) );
?>
</div>
<?php
// Social share
$currentURL = get_permalink( $post->ID );
?>
<div class="social-share">
<i class="fa fa-facebook"></i>
<i class="fa fa-pinterest-p"></i>
</div>
</header>
<section class="entry-content cf" itemprop="articleBody">
<div class="content-wrap">
<?php the_content(); ?>
<?php
// projects Link
$projectsURL = site_url()."/brand/".$currentBrandSlug;
if($projects){ ?>
View all <?php echo $currentBrandName; ?> projectss ›
<?php }; ?>
</div>
<?php
// Additional Info
$materials = get_field('materials', $post->ID);
$projectsSpecs = get_field('projects_specs', $post->ID);
if($materials || $projectsSpecs){ ?>
<div class="additional-info">
<?php
// Materials
if($materials){ ?>
<h4>Materials <i class="fa fa-pencil"></i></h4>
<p><?php the_field('materials'); ?></p>
<?php };
// projects Specs
if($projectsSpecs){ ?>
Download Specs <i class="fa fa-download"></i>
<?php }; ?>
</div>
<?php } ?>
</section>
<?php/*
// Show the Gallery
if( have_rows('gallery_slideshow') ):
echo '<div class="projects-gallery-wrap-mobile">';
echo '<div class="projects-gallery-mobile">';
// loop through the rows of data
while ( have_rows('gallery_slideshow') ) : the_row();
$imgObj = get_sub_field('image', $post->ID);
echo '<img class="item" src="'.$imgObj[sizes]['projects-gallery'].'" alt="'.$imgObj[alt].'"/>';
endwhile;
echo '</div>';
echo '</div>';
endif;
*/ ?>
</div>
</article>
<?php get_template_part('parts/enquiry_form'); ?>
</main>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
<?php get_footer(); ?>
Please help me to find the error. Thanks
Need to make linkable images with Camera Slideshow. url must be received from Url_A in material.
in _item.php
<div class="camera-item" data-src="<?php echo htmlspecialchars($images->image_intro); ?>">
I tried to do
<?php $urls = json_decode($item->urls); ?>
<a href="<?php echo $urls->urla;?>">
<div class="camera-item" data-src="<?php echo htmlspecialchars($images->image_intro); ?>">
</div></a>
but got error. Help to novice please! and sorry for bad english :)
21.08
Full code of _item.php with some changes
<?php
defined('_JEXEC') or die;
$images = json_decode($item->images);
$urls = json_decode($item->urls);
$slider_img = htmlspecialchars($images->image_intro);
?>
<div class="camera-item" rel="<?php echo $urls->urla;?>" data-src="<? echo $slider_img; ?>">
<?php if ($params->get('show_caption')): ?>
<div class="camera_caption <?php echo $params->get('captionEffect'); ?>">
<?php $item_heading = $params->get('item_heading', 'h4'); ?>
<?php if ($params->get('item_title')) : ?>
<<?php echo $item_heading; ?> class="slide-title<?php echo $params->get('moduleclass_sfx'); ?>">
<?php if ($params->get('link_titles') && $item->link != '') : ?>
<a href="<?php echo $item->link;?>">
<?php echo $item->title;?></a>
<?php else : ?>
<?php echo $item->title; ?>
<?php endif; ?>
</<?php echo $item_heading; ?>>
<?php endif; ?>
<?php if (!$params->get('intro_only')) :
echo $item->afterDisplayTitle;
endif; ?>
<?php echo $item->beforeDisplayContent; ?>
<?php echo $item->introtext; ?>
<?php if (isset($item->link) && $item->readmore != 0 && $params->get('readmore')) :
echo '<a class="readmore" href="'.$item->link.'">'.$item->linkText.'</a>';
endif; ?>
</div>
<?php endif; ?>
</div>
I got url to atribute rel but still can't make clickable images :(
In firebug
<div id="camera-slideshow" class="camera_wrap" style="height: 755px;">
<div class="camera_fakehover">
<div class="camera_src camerastarted camerasliding">
<div class="camera-item" data-src="images/slide1.jpg" rel="/index.php/urla"> </div>
<div class="camera-item" data-src="images/slide2.jpg" rel="/index.php/urla"> </div>
<div class="camera-item" data-src="images/slide3.jpg" rel=""> </div>
</div>
source code
<div class="camera-item" rel="/index.php/urla" data-src="images/slide1.jpg">
<div class="camera_caption fadeIn">
<div class="txt1">some text</div>
<div class="txt2">some text</div>
</div>
</div>
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.