Comic easel and Salient theme
-
Hello. I am needing help with getting the Comic Easel plugin to work with a theme i purchased.
I am using a theme called Salient
http://themeforest.net/item/salient-responsive-multipurpose-theme/4363266here is my site:
http://www.theshatteredworld.comI was able to download and install Comic Easel and tried to follow the steps to add test pages and see if it would work. unfortunately my page comes out looking like this:
http://www.theshatteredworld.com/comic/page-test-1/
and the navigation bar is missing.
I am new to CSS so any help would be wonderful
-
ok so i get the nav bar to show up but for each page where a comic page is sitting there is a second image below it… not sure what i am doing wrong
I also had a question about the background. currently the BG is white. is there a way to change the BG to another color or add a BG image?
I was able to get the plugin to work but it is posting the page twice (one above the other).
Themes that are not built with Comic Easel integration need to have the php code added manually.
in the single.php and index.php files the
do_action('comic-area');
needs to be added; it’s code that is executed to allow comic easel to insert itself into the theme
Ok. I don’t seem to have an index.php file.
i added it to the single.php and i’ve made it a lot worse. is there a particular place that is best for placing the <?php do_action(‘comic-area’); ?> ?
here is the Single.php code:
<?php get_header(); ?> <?php $bg = get_post_meta($post->ID, '_nectar_header_bg', true); $bg_color = get_post_meta($post->ID, '_nectar_header_bg_color', true); if(have_posts()) : while(have_posts()) : the_post(); nectar_page_header($post->ID); endwhile; endif; ?> <div class="container-wrap"> <div class="container main-content"> <?php do_action('comic-area'); ?> <?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)) { ?> <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"><a>"><?php comments_number( __('No Comments', NECTAR_THEME_NAME), __('One Comment ', NECTAR_THEME_NAME), __('% Comments', NECTAR_THEME_NAME) ); ?></a></span> <!--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 if( !empty($options['blog_social']) && $options['blog_social'] == 1 ) { echo '<div class="nectar-social">'; echo '<span class="n-shortcode">'.nectar_love('return').'</span>'; //facebook if(!empty($options['blog-facebook-sharing']) && $options['blog-facebook-sharing'] == 1) { echo "<a href='#'> <i class='icon-facebook'></i> <span class='count'></span></a>"; } //twitter if(!empty($options['blog-twitter-sharing']) && $options['blog-twitter-sharing'] == 1) { echo "<a href='#'> <i class='icon-twitter'></i> <span class='count'></span></a>"; } //pinterest if(!empty($options['blog-pinterest-sharing']) && $options['blog-pinterest-sharing'] == 1) { echo "<a href='#'> <i class='icon-pinterest'></i> <span class='count'></span></a>"; } echo '</div>'; } ?> </div><!--/single-meta--> </div><!--/section-title--> </div><!--/row--> <?php } endwhile; endif; ?> <?php } ?> <div class="row"> <?php $options = get_option('salient'); $blog_type = $options['blog_type']; if($blog_type == 'std-blog-fullwidth'){ 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( !empty($options['author_bio']) && $options['author_bio'] == true ){ $grav_size = 80; ?> <div id="author-bio"> <?php if (function_exists('get_avatar')) { echo get_avatar( get_the_author_meta('email'), $grav_size ); }?> <div id="author-info"> <h3><?php _e('About', NECTAR_THEME_NAME); ?> <?php the_author(); ?></h3> <p><?php the_author_meta('description'); ?></p> </div> <div class="clear"></div> </div> <?php } ?> <div class="comments-section"> <?php comments_template(); ?> </div> </div><!--/span_9--> <?php if($blog_type != 'std-blog-fullwidth') { ?> <div id="sidebar" class="col span_3 col_last"> <?php get_sidebar(); ?> </div><!--/sidebar--> <?php } ?> </div><!--/row--> </div><!--/container--> </div><!--/container-wrap--> <?php get_footer(); ?>
[Moderator Note: Please post code or markup between backticks or use the code button. Or better still – use a pastebin. Your posted code has now been permanently damaged by the forum’s parser.]
I would need to also see this file:
includes/post-templates/entry.php
that’s a sub directory inside the theme, if you can pastebin it or use proper code markup if it’s not huge
here is the entry.php
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div class="post-content"> <?php if( !is_single() ) { ?> <?php global $layout; $extra_class = ''; if (!has_post_thumbnail()) $extra_class = 'no-img'; ?> <div class="post-meta <?php echo $extra_class; ?>"> <?php $options = get_option('salient'); $blog_type = $options['blog_type']; $use_excerpt = (!empty($options['blog_auto_excerpt']) && $options['blog_auto_excerpt'] == '1') ? 'true' : 'false'; ?> <div class="date"> <?php if( $blog_type == 'masonry-blog-sidebar' && substr( $layout, 0, 3 ) != 'std' || $blog_type == 'masonry-blog-fullwidth' && substr( $layout, 0, 3 ) != 'std' || $blog_type == 'masonry-blog-full-screen-width' && substr( $layout, 0, 3 ) != 'std' || $layout == 'masonry-blog-sidebar' || $layout == 'masonry-blog-fullwidth' || $layout == 'masonry-blog-full-screen-width') { echo get_the_date(); } else { ?> <span class="month"><?php the_time('M'); ?></span> <span class="day"><?php the_time('d'); ?></span> <?php $options = get_option('salient'); if(!empty($options['display_full_date']) && $options['display_full_date'] == 1) { echo '<span class="year">'. get_the_time('Y') .'</span>'; } } ?> </div><!--/date--> <div class="nectar-love-wrap"> <?php if( function_exists('nectar_love') ) nectar_love(); ?> </div><!--/nectar-love-wrap--> </div><!--/post-meta--> <?php } ?> <div class="content-inner"> <?php if ( has_post_thumbnail() ) { if( !is_single() ) { echo '<a href="' . get_permalink() . '">'; } echo '<span class="post-featured-img">'.get_the_post_thumbnail($post->ID, 'full', array('title' => '')) .'</span>'; if( !is_single() ) { echo'</a>'; } } ?> <?php if( !is_single() ) { ?> <div class="post-header"> <h2 class="title"><?php if( !is_single() ) { ?> <a href="<?php the_permalink(); ?>"><?php } ?><?php the_title(); ?><?php if( !is_single() ) {?> </a> <?php } ?></h2> <span class="meta-author"><?php echo __('By', NECTAR_THEME_NAME); ?> <?php the_author_posts_link(); ?></span> <span class="meta-category">| <?php the_category(', '); ?></span> <span class="meta-comment-count">| <a href="<?php comments_link(); ?>"> <?php comments_number( __('No Comments', NECTAR_THEME_NAME), __('One Comment ', NECTAR_THEME_NAME), __('% Comments', NECTAR_THEME_NAME) ); ?></a></span> </div><!--/post-header--> <?php //if no excerpt is set global $post; if(empty( $post->post_excerpt ) && $use_excerpt != 'true') { the_content('<span class="continue-reading">'. __("Read More", NECTAR_THEME_NAME) . '</span>'); } //excerpt else { echo '<div class="excerpt">'; the_excerpt(); echo '</div>'; echo '<a class="more-link" href="' . get_permalink() . '"><span class="continue-reading">'. __("Read More", NECTAR_THEME_NAME) .'</span></a>'; } ?> <?php } ?> <?php if(is_single()){ //on the single post page display the content the_content('<span class="continue-reading">'. __("Read More", NECTAR_THEME_NAME) . '</span>'); } ?> <?php $options = get_option('salient'); if( $options['display_tags'] == true ){ if( is_single() && has_tag() ) { echo '<div class="post-tags"><h4>Tags: </h4>'; the_tags('','',''); echo '<div class="clear"></div></div> '; } } ?> </div><!--/content-inner--> </div><!--/post-content--> </article><!--/article-->
This line, inside that file:
echo '<span class="post-featured-img">'.get_the_post_thumbnail($post->ID, 'full', array('title' => '')) .'</span>';
Change it to:
if ($post->post_type !== 'comic') echo '<span class="post-featured-img">'.get_the_post_thumbnail($post->ID, 'full', array('title' => '')) .'</span>';
^ See that bit of code there that was added? it says if the post type is *not* a comic post type then go ahead and do this, this way the post featured image isn’t displayed as it would be on regular posts
Actually..
<?php if ( has_post_thumbnail() ) {
would probably be better here:
<?php if (has_post_thumbnail() && ($post->post_type !== 'comic)) {
like this?
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div class="post-content"> <?php if( !is_single() ) { ?> <?php global $layout; $extra_class = ''; if (!has_post_thumbnail()) $extra_class = 'no-img'; ?> <div class="post-meta <?php echo $extra_class; ?>"> <?php $options = get_option('salient'); $blog_type = $options['blog_type']; $use_excerpt = (!empty($options['blog_auto_excerpt']) && $options['blog_auto_excerpt'] == '1') ? 'true' : 'false'; ?> <div class="date"> <?php if( $blog_type == 'masonry-blog-sidebar' && substr( $layout, 0, 3 ) != 'std' || $blog_type == 'masonry-blog-fullwidth' && substr( $layout, 0, 3 ) != 'std' || $blog_type == 'masonry-blog-full-screen-width' && substr( $layout, 0, 3 ) != 'std' || $layout == 'masonry-blog-sidebar' || $layout == 'masonry-blog-fullwidth' || $layout == 'masonry-blog-full-screen-width') { echo get_the_date(); } else { ?> <span class="month"><?php the_time('M'); ?></span> <span class="day"><?php the_time('d'); ?></span> <?php $options = get_option('salient'); if(!empty($options['display_full_date']) && $options['display_full_date'] == 1) { echo '<span class="year">'. get_the_time('Y') .'</span>'; } } ?> </div><!--/date--> <div class="nectar-love-wrap"> <?php if( function_exists('nectar_love') ) nectar_love(); ?> </div><!--/nectar-love-wrap--> </div><!--/post-meta--> <?php } ?> <div class="content-inner"> <?php if (has_post_thumbnail() && ($post->post_type !== 'comic)) { if( !is_single() ) { echo '<a href="' . get_permalink() . '">'; } if ($post->post_type !== 'comic') echo '<span class="post-featured-img">'.get_the_post_thumbnail($post->ID, 'full', array('title' => '')) .'</span>'; if( !is_single() ) { echo'</a>'; } } ?> <?php if( !is_single() ) { ?> <div class="post-header"> <h2 class="title"><?php if( !is_single() ) { ?> <a href="<?php the_permalink(); ?>"><?php } ?><?php the_title(); ?><?php if( !is_single() ) {?> </a> <?php } ?></h2> <span class="meta-author"><?php echo __('By', NECTAR_THEME_NAME); ?> <?php the_author_posts_link(); ?></span> <span class="meta-category">| <?php the_category(', '); ?></span> <span class="meta-comment-count">| <a href="<?php comments_link(); ?>"> <?php comments_number( __('No Comments', NECTAR_THEME_NAME), __('One Comment ', NECTAR_THEME_NAME), __('% Comments', NECTAR_THEME_NAME) ); ?></a></span> </div><!--/post-header--> <?php //if no excerpt is set global $post; if(empty( $post->post_excerpt ) && $use_excerpt != 'true') { the_content('<span class="continue-reading">'. __("Read More", NECTAR_THEME_NAME) . '</span>'); } //excerpt else { echo '<div class="excerpt">'; the_excerpt(); echo '</div>'; echo '<a class="more-link" href="' . get_permalink() . '"><span class="continue-reading">'. __("Read More", NECTAR_THEME_NAME) .'</span></a>'; } ?> <?php } ?> <?php if(is_single()){ //on the single post page display the content the_content('<span class="continue-reading">'. __("Read More", NECTAR_THEME_NAME) . '</span>'); } ?> <?php $options = get_option('salient'); if( $options['display_tags'] == true ){ if( is_single() && has_tag() ) { echo '<div class="post-tags"><h4>Tags: </h4>'; the_tags('','',''); echo '<div class="clear"></div></div> '; } } ?> </div><!--/content-inner--> </div><!--/post-content--> </article><!--/article-->
you’re missing an end squote after the ‘comic)) should be ‘comic’))
..and there’s 2 places to do that particular thing at
I am not sure what is happening.
the duplicate image is gone (which is great! Thank you!!)
but i am seeing an error message that says
Parse error: syntax error, unexpected ‘?’ in /home/burmuss/theshatteredworld.com/wp-content/themes/salient/includes/post-templates/entry.php on line 72also you mentioned a 2nd place for that code?
well look at line 72 in that code it’s probably something you modified and added an extra ? or something
there are two sections that have
<?php if (has_post_thumbnail()) {
You should probably do both and NOT the one with the echo btw – that was before I saw the one you really should do
like this?
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div class="post-content"> <?php if( !is_single() ) { ?> <?php global $layout; $extra_class = ''; if (!has_post_thumbnail()) $extra_class = 'no-img'; ?> <div class="post-meta <?php echo $extra_class; ?>"> <?php $options = get_option('salient'); $blog_type = $options['blog_type']; $use_excerpt = (!empty($options['blog_auto_excerpt']) && $options['blog_auto_excerpt'] == '1') ? 'true' : 'false'; ?> <div class="date"> <?php if( $blog_type == 'masonry-blog-sidebar' && substr( $layout, 0, 3 ) != 'std' || $blog_type == 'masonry-blog-fullwidth' && substr( $layout, 0, 3 ) != 'std' || $blog_type == 'masonry-blog-full-screen-width' && substr( $layout, 0, 3 ) != 'std' || $layout == 'masonry-blog-sidebar' || $layout == 'masonry-blog-fullwidth' || $layout == 'masonry-blog-full-screen-width') { echo get_the_date(); } else { ?> <span class="month"><?php the_time('M'); ?></span> <span class="day"><?php the_time('d'); ?></span> <?php $options = get_option('salient'); if(!empty($options['display_full_date']) && $options['display_full_date'] == 1) { echo '<span class="year">'. get_the_time('Y') .'</span>'; } } ?> </div><!--/date--> <div class="nectar-love-wrap"> <?php if( function_exists('nectar_love') ) nectar_love(); ?> </div><!--/nectar-love-wrap--> </div><!--/post-meta--> <?php } ?> <div class="content-inner"> <?php if ( has_post_thumbnail() ) { if( !is_single() ) { echo '<a href="' . get_permalink() . '">'; } echo '<span class="post-featured-img">'.get_the_post_thumbnail($post->ID, 'full', array('title' => '')) .'</span>'; if( !is_single() ) { echo'</a>'; } } ?> <?php if( !is_single() ) { ?> <div class="post-header"> <h2 class="title"><?php if( !is_single() ) { ?> <a href="<?php the_permalink(); ?>"><?php } ?><?php the_title(); ?><?php if( !is_single() ) {?> </a> <?php } ?></h2> <span class="meta-author"><?php echo __('By', NECTAR_THEME_NAME); ?> <?php the_author_posts_link(); ?></span> <span class="meta-category">| <?php the_category(', '); ?></span> <span class="meta-comment-count">| <a href="<?php comments_link(); ?>"> <?php comments_number( __('No Comments', NECTAR_THEME_NAME), __('One Comment ', NECTAR_THEME_NAME), __('% Comments', NECTAR_THEME_NAME) ); ? ></a></span> </div><!--/post-header--> <?php //if no excerpt is set global $post; if(empty( $post->post_excerpt ) && $use_excerpt != 'true') { the_content('<span class="continue-reading">'. __("Read More", NECTAR_THEME_NAME) . '</span>'); } //excerpt else { echo '<div class="excerpt">'; the_excerpt(); echo '</div>'; echo '<a class="more-link" href="' . get_permalink() . '"><span class="continue-reading">'. __("Read More", NECTAR_THEME_NAME) .'</span></a>'; } ?> <?php } ?> <?php if(is_single()){ //on the single post page display the content the_content('<span class="continue-reading">'. __("Read More", NECTAR_THEME_NAME) . '</span>'); } ?> <?php $options = get_option('salient'); if( $options['display_tags'] == true ){ if( is_single() && has_tag() ) { echo '<div class="post-tags"><h4>Tags: </h4>'; the_tags('','',''); echo '<div class="clear"></div></div> '; } } ?> </div><!--/content-inner--> </div><!--/post-content--> </article><!--/article-->
<?php if ( has_post_thumbnail() ) {
turns into
<?php if (has_post_thumbnail() && ($post->post_type !== 'comic')) {
Thank you! that got rid of most of the error!!
I did have three other questions.
if you scroll to the bottom of this page http://www.theshatteredworld.com/comic/page-test-1/
it shows “rticle–>” right before the comment box?
also i kept getting three of the same page images until i deleted
<?php do_action('comic-area'); ?>
from the single.phpshould i add it back?
and is there a way to get the grey background to carry on to the bottom of the page?
- The topic ‘Comic easel and Salient theme’ is closed to new replies.