WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Thirteen
[resolved] Code issue: footer and sidebar somehow merged! (5 posts)

  1. jgeralnick
    Member
    Posted 4 months ago #

    In the 2013 Theme editor, I think I somehow edited my footer and sidebar code so that the sidebar widgets now show up right above the footer. I edited my footer to contain the code for google analytics and then tried to add google adsense to the sidebar and that is when the two somehow merged. How do I move the widgets/sidebar back to the right side of the screen?

    Here is my page: http://www.chroniclesofadietitian.com

    Here is the code for the sidebar:

    <?php
    /**
     * The sidebar containing the secondary widget area
     *
     * Displays on posts and pages.
     *
     * If no active widgets are in this sidebar, hide it completely.
     *
     * @package WordPress
     * @subpackage Twenty_Thirteen
     * @since Twenty Thirteen 1.0
     */
    
    if ( is_active_sidebar( 'sidebar-2' ) ) : ?>
    	<div id="tertiary" class="sidebar-container" role="complementary">
    		<div class="sidebar-inner">
    			<div class="widget-area">
    				<?php dynamic_sidebar( 'sidebar-2' ); ?>
    			</div><!-- .widget-area -->
    		</div><!-- .sidebar-inner -->
    	</div><!-- #tertiary -->
    <?php endif; ?>

    Here is my footer:

    <?php
    /**
     * The template for displaying the footer
     *
     * Contains footer content and the closing of the #main and #page div elements.
     *
     * @package WordPress
     * @subpackage Twenty_Thirteen
     * @since Twenty Thirteen 1.0
     */
    ?>
    		<script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
    
      ga('create', 'UA-47228611-1', 'chroniclesofadietitian.com');
      ga('send', 'pageview');
    
    </script>
    
    </script>
    		</div><!-- #main -->
    		<footer id="colophon" class="site-footer" role="contentinfo">
    			<?php get_sidebar( 'main' ); ?>
    
    			<div class="site-info">
    				<?php do_action( 'twentythirteen_credits' ); ?>
    				<a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentythirteen' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentythirteen' ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentythirteen' ), 'WordPress' ); ?></a>
    			</div><!-- .site-info -->
    		</footer><!-- #colophon -->
    	</div><!-- #page -->
    
    	<?php wp_footer(); ?>
    </body>
    </html>
  2. Glazed Donuts
    Member
    Posted 3 months ago #

    Hi, I looked at your website, and it looks like the sidebars are working fine. They don't appear merged in the footer. What did you end up doing to fix this? I'm using the same theme as you, and I'm having problems with the sidebar at the bottom of the page with the footer instead of on the side.

    Can you please tell me what you did to fix this problem? Thanks!

  3. jgeralnick
    Member
    Posted 3 months ago #

    Unfortunately, I had a friend who works with coding fix it! I'm sorry I can't be more of a help!

  4. Glazed Donuts
    Member
    Posted 3 months ago #

    Ok thanks anyway... It's so frustrating. Theres nothing on Google either...

  5. Glazed Donuts
    Member
    Posted 3 months ago #

    Okay, I figured out what the problem was. Apparently, this new update of WordPress doesn't seem to like it when you use Schemas (www.schema.org). I was using schemas throughout my site to help improve SEO. Guess I can't do that now...

Reply

You must log in to post.

About this Theme

About this Topic