• Resolved AnnaHavanna

    (@annahavanna)


    Hi,

    I pasted a part of my logo in my right sidebar and I pasted the text below in my style.css. But it is not visible… Any idea?
    goo.gl/mBI59h

    #secondary {
    float: right;
    margin-right: 0px !important;
    width: 18,8%;
    }

    Thanks.

Viewing 15 replies - 1 through 15 (of 21 total)
  • juggledad

    (@juggledad)

    It looks like you are using a customized version of the twenty eleven theme. Do you actally have any widgets in the sidebar?

    If yo do, then I would suggest that there is a bug in the themes customization and without access to the theme there is not much that we can help you with.

    Thread Starter AnnaHavanna

    (@annahavanna)

    Yes, I have a text widget in the general sidebar:
    <img src=”../../Sidebar_Logo5.jpg”>

    Would it help if I paste the content of my style.css?

    juggledad

    (@juggledad)

    the sidebar is not being displayed – this could be issue with the customization. Not knowing what you have customized or having access to the customized theme code, there is not much I can suggest but that you review the code to see why it is not displaying the sidebar.

    Thread Starter AnnaHavanna

    (@annahavanna)

    That’s my style.css:

    /*
    Theme Name: test
    Description: Child theme based on twentyeleven
    Author: test
    Version: 1.0.0
    Template: twentyeleven
    */

    /*
    Hier kommt jetzt das Importieren des Parent-Theme-Stylesheets
    */
    @import url(‘../twentyeleven/style.css’);

    .page #respond { display: none; }

    /* =Menu Aenderung Farben und so
    ————————————————————– */

    /* Menu Background */
    #access {
    background: #cccccc; /* Show a solid color for older browsers */
    background: -moz-linear-gradient(#cccccc, #cccccc);
    }

    /* Reduce space outside menu items and center whole menu*/
    #access ul {
    display: table;
    margin: 0 auto;
    width: auto;
    }

    /*
    Farbaenderung des Text-Bodys in weiss
    */
    #page {
    background: #FFFFFF;
    }

    #site-generator {
    background: #FFFFFF;
    }

    /* Change space between header image and browser top */
    #page {
    margin-top: 20px;
    }

    /* Removing weird lightgrey line from the top of the header image by changing the border-top from 2px to 0px */
    #branding {
    border-top: 0px solid #bbb;
    padding-bottom: 10px;
    position: relative;
    z-index: 9999;
    }

    /* Reducing white space between menu and title of the page */
    .singular.page .hentry {
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
    }

    .singular .hentry {
    border-bottom: medium none;
    padding: 0;
    position: relative;
    }

    /* Changing of fonts – Titel */
    .singular .entry-title {
    color: #000;
    font-size: 16px;
    font-weight: bold;
    line-height: 14px;
    }

    /* Changing of fonts – Font size and font color and font-weight of top menu */
    #access a {
    font-size:13px;
    color: #f36d00 !important;
    font-weight: bold;
    }

    /* Changing of fonts – Font size of image caption text */
    .wp-caption p.wp-caption-text {
    font-size:11px;
    line-height:17px;
    margin:0;
    padding:0 4px 5px;
    }

    .wp-caption .wp-caption-text:before {
    content: ”; /*remove the symbol before caption text */
    }

    /* Remove the search-field and remove the right padding from the top menu*/
    #branding .only-search #searchform {
    display: none;
    }
    #branding .only-search + #access div {
    padding-right: 0;
    }

    /* Remove search-field*/
    #branding #searchform {
    display: none;
    position: absolute;
    right: 7.6%;
    text-align: right;
    top: 3.8em;
    }

    /*Place graphic element in sidebar directly at the right margin*/
    #secondary {
    float: right;
    margin-right: 0px !important;
    width: 18.8%;
    }

    /* Center the top menu*/
    #access ul {
    width: 800px; /* Width of top menu*/
    margin: 0 auto;
    display: block;
    position: static;
    float: none;
    }

    Thread Starter AnnaHavanna

    (@annahavanna)

    I know there a some double codes in my style.css, but is there anything completely wrong?

    juggledad

    (@juggledad)

    It has nothing to do with the css, The page template is not displaying the sidebar. Since it doesn’t build the sidebar elements, the CSS can’t be applied.

    You need to fix the PHP code

    Thread Starter AnnaHavanna

    (@annahavanna)

    Hi again. Here’s the content of my page.php:

    <?php
    /**
     * Template for displaying all pages
     *
     * This is the template that displays all pages by default.
     * Please note that this is the WordPress construct of pages
     * and that other 'pages' on your WordPress site will use a
     * different template.
     *
     * @package WordPress
     * @subpackage Twenty_Eleven
     * @since Twenty Eleven 1.0
     */
    
    get_header('test'); ?>
    <div id="primary">
    <div id="content" role="main">
    <?php while ( have_posts() ) : the_post(); ?>
    <?php get_template_part( 'content', 'page' ); ?>
    <?php comments_template( '', true ); ?>
    <?php endwhile; // end of the loop. ?>
    </div><!-- #content -->
    </div><!-- #primary -->
    <?php get_footer('test'); ?>
    juggledad

    (@juggledad)

    The twentyeleven theme does not display a sidebar on pages by design.

    if you want to change that you will have to modify the code. You can take a look at index.php for an example.

    Thread Starter AnnaHavanna

    (@annahavanna)

    Ok, now slowly, please ??
    This is the content of the index.php. Which part I will have to modify?

    <?php
    /**
     * Front to the WordPress application. This file doesn't do anything, but loads
     * wp-blog-header.php which does and tells WordPress to load the theme.
     *
     * @package WordPress
     */
    
    /**
     * Tells WordPress to load the WordPress theme and output it.
     *
     * @var bool
     */
    define('WP_USE_THEMES', true);
    
    /** Loads the WordPress Environment and Template */
    require( dirname( __FILE__ ) . '/wp-blog-header.php' );

    juggledad

    (@juggledad)

    That is wodpress’s index.php. You need to look at the index.php in your theme’s folder.
    ie …/wp-content/themes/yourtheme/index.php

    Thread Starter AnnaHavanna

    (@annahavanna)

    Ok. That’s the content. I suppose I need to replace this part of the code:
    <?php get_sidebar(); ?>
    But how? How do I get my text widget (with the image inside) in this sidebar. Sorry, but I don’t get it. I really appreciate your help.

    get_header(); ?>
    
    		<div id="primary">
    			<div id="content" role="main">
    
    			<?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><!-- #primary -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    juggledad

    (@juggledad)

    well you need to display the sidebar before a widget will show up in the sidebar….so what in that code do you think you might need?

    Thread Starter AnnaHavanna

    (@annahavanna)

    This code, I suppose, like I mentioned before. But what I put in there and what else I will need?
    <?php get_sidebar(); ?>

    juggledad

    (@juggledad)

    did you try it?

    Thread Starter AnnaHavanna

    (@annahavanna)

    No, because I do not know what to put in between the brackets…

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Sidebar is not showing at all’ is closed to new replies.