• Hello,

    If anybody can help me it would be great.

    Site:
    thepipaccumulator.com

    Problem:
    I am trying to get the sidebar to display when viewing single posts (single.php). When I look at the html for a single posts (view source) the sidebar is present but it cannot be seen in the actual page.

    <?php get_sidebar() ?> is where it should be just before the footer in single.php

    Sidebar works fine at index.php…

    single.php

    <?php get_header(); ?>
    	<div id="container">
    		<div id="content" class="hfeed">
    
    <?php the_post(); ?>
    
    			<div id="post-<?php the_ID(); ?>" class="<?php veryplaintxt_post_class(); ?>">
    				<h2 class="entry-title"><?php the_title(); ?></h2>
    				<div class="entry-content">
    <?php the_content('<span class="more-link">'.__('Read More', 'veryplaintxt').'</span>'); ?>
    
    <?php link_pages('<div class="page-link">'.__('Pages: ', 'veryplaintxt'), "</div>\n", 'number'); ?>
    				</div>
    
    				<div class="entry-meta">
    					<?php printf(__('This was written by %1$s. Posted on <abbr class="published" title="%2$s">%3$s at %4$s</abbr>. Filed under %5$s. %6$sBookmark the <a href="%7$s" title="Permalink to %8$s" rel="bookmark">permalink</a>. Follow comments here with the <a href="%9$s" title="Comments RSS to %8$s" rel="alternate" type="application/rss+xml">RSS feed</a>.', 'sandbox'),
    						'<span class="vcard"><span class="fn n">' . $authordata->display_name . '</span></span>',
    						get_the_time('Y-m-d\TH:i:sO'),
    						the_date('l, F j, Y,', '', '', false),
    						get_the_time(),
    						get_the_category_list(', '),
    						get_the_tag_list('Tagged ', ', ', '. '),
    						get_permalink(),
    						wp_specialchars(get_the_title(), 'double'),
    						comments_rss() ) ?>
    <?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) : ?>
    					<?php printf(__('<a href="#respond" title="Post a comment">Post a comment</a> or leave a <a href="%s" rel="trackback" title="Trackback URL for your post">trackback</a>.', 'veryplaintxt'), get_trackback_url()) ?>
    <?php elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) : ?>
    					<?php printf(__('Comments are closed, but you can leave a <a href="%s" rel="trackback" title="Trackback URL for your post">trackback</a>.', 'veryplaintxt'), get_trackback_url()) ?>
    <?php elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) : ?>
    					<?php printf(__('Trackbacks are closed, but you can <a href="#respond" title="Post a comment">post a comment</a>.', 'veryplaintxt')) ?>
    <?php elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) :?>
    					<?php _e('Both comments and trackbacks are currently closed.', 'veryplaintxt') ?>
    <?php endif; ?>
    
    <?php edit_post_link(__('Edit this entry.', 'veryplaintxt'),'',''); ?>
    				</div>
    			</div><!-- .post -->
    
    <?php comments_template(); ?>
    
    			<div id="nav-below" class="navigation">
    				<div class="nav-previous"><?php previous_post_link(__('&lsaquo; %link', 'veryplaintxt')) ?></div>
    				<div class="nav-next"><?php next_post_link(__('%link &rsaquo;', 'veryplaintxt')) ?></div>
    			</div>
    
    		</div><!-- #content .hfeed -->
    	</div><!-- #container -->
    
    <?php get_sidebar() ?>
    <?php get_footer(); ?>

Viewing 6 replies - 1 through 6 (of 6 total)
  • you are missing the semi colon in the <?php get_sidebar() ?>
    put semicolon <?php get_sidebar();?>

    Thread Starter smith.mincha

    (@smithmincha)

    Hmmm,

    Thanks for the reply but I added the simi colon and still same issue.

    Still no sidebar to be seen

    which theme are you using ???

    this line in style.css hides quite a few elements of your site:

    body.home div#globalnav,body.archive div#globalnav,body.search div#globalnav,body.four04 div#globalnav,body div#globalnav ul li ul,div.access,body.single div.sidebar,body.page div.sidebar,span#theme-link span.additional-name,span#theme-link span.family-name{display:none;}

    this section of it obviously hides the sidebar on single posts:

    body.single div.sidebar,

    caveat:
    making the sidebar visible on single posts will cause other formatting problems as the theme was obviously designed not to show a sidebar on single posts.

    for those general formatting issues, try working with a browser inspection tool such as Firebug, or consult a dedicated css forum like http://csscreator.com/forum

    Thread Starter smith.mincha

    (@smithmincha)

    Veryplaintext

    The single.php file that I posted is defiantly in use.
    I added some HTML and saw the result in the page confirming that it is being used by the template.

    Thread Starter smith.mincha

    (@smithmincha)

    Thanks very much this helps a lot.

    Very useful information and quick responses.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Sidebar not displaying even though is present’ is closed to new replies.