WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Sidebar not showing up? (8 posts)

  1. mattron
    Member
    Posted 1 year ago #

    Hey friendly forum people - I am setting up a site for a client and having some issues with the sidebar. The way I have it set up is that the landing page of the site does not display posts - it is set to a static page under "settings>reading" and in this case that page is "home" - I have a blog page titled "journal" and under the same settings I have "posts page" set to "journal". It is my understanding that the page set to "posts page" is set to use the index.php template, and the template calls up the sidebar, but the sidebar is simply not showing up - I have made some slight styling changes to the files, but as far as I can tell nothing that would throw it off. Here is my index.php:

    <?php
    /**
     * The main template file.
     *
     * This is the most generic template file in a WordPress theme
     * and one of the two required files for a theme (the other being style.css).
     * It is used to display a page when nothing more specific matches a query.
     * E.g., it puts together the home page when no home.php file exists.
     * Learn more: http://codex.wordpress.org/Template_Hierarchy
     *
     * @package WordPress
     * @subpackage Twenty_Eleven
     */
    
    get_header(); ?>
    
    		<div id="journal">
    			<div id="content" role="main">
    
    			<h1>Journal</h1>
    
    			<?php if ( have_posts() ) : ?>
    
    				<?php twentyeleven_content_nav( 'nav-above' ); ?>
    
    				<?php /* Start the Loop */ ?>
    				<?php while ( have_posts() ) : the_post(); ?>
    
    					<?php get_template_part( 'content', get_post_format() ); ?>
    
    				<?php endwhile; ?>
    
    				<?php twentyeleven_content_nav( 'nav-below' ); ?>
    
    			<?php else : ?>
    
    				<article id="post-0" class="post no-results not-found">
    					<header class="entry-header">
    						<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
    					</header><!-- .entry-header -->
    
    					<div class="entry-content">
    						<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
    						<?php get_search_form(); ?>
    					</div><!-- .entry-content -->
    				</article><!-- #post-0 -->
    
    			<?php endif; ?>
    
    			</div><!-- #content -->
    		</div><!-- #journal -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    I have not touched the sidebar.php file, and just to be clear, the posts are displaying on the page correctly, the sidebar is absent. It is a site I am working on locally so I have no way of sharing it really.

    Any ideas would be welcomed! Thanks!
    Matt

  2. mattron
    Member
    Posted 1 year ago #

    Also - I have tried uninstalling all plugins and the problem persisted - just fyi

    Thanks!

  3. How about a link to the site so I can take a look?

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    It is my understanding that the page set to "posts page" is set to use the index.php template,

    Your understanding is correct. You are using a child theme, aren't you?

  5. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    there is the dashboard - appearance - theme options page;
    have you ticked a layout with sidebar?

    also, have you adjusted style.css to follow the change from #primary to #journal?
    the sidebar might just be somewhere out of view - is the sidebar code in the html in the browser?

  6. mattron
    Member
    Posted 1 year ago #

    JerrySarcastic - were you being sarcastic about the link to the site, because I explained it is a local site, and can't give a link - thanks anyway though!

    esmi - I am using a child theme

    alchymth The Sweeper - It's usually the simplest solutions! This is the first site I've designed after this feature, and completely forgot about that, and that was the problem - thank you!

  7. Yes, that was sarcasm, though it also makes it more difficult for others to troubleshoot, but I'm sure you're aware of that.

    Glad you got some help, though. :)

  8. mattron
    Member
    Posted 1 year ago #

    haha - right on, yeah I'm aware - it's a bummer, it's a lot to ask of someone to help you on an issue when you can't even show them what you're talking about - it's really annoying too, but yest, thank you, and thanks everyone for the help!

    Matt

Topic Closed

This topic has been closed to new replies.

About this Topic