• Resolved Shaunrafuse

    (@shaunrafuse)


    I’m using the twenty fourteen extended theme and I have the primary side bar moved to the right and I want an additional sidebar on the left that I can just run some ads in. Is this doable?

Viewing 12 replies - 1 through 12 (of 12 total)
  • There is no theme called “twenty fourteen extended theme”. Are you using the plugin of the same name?

    Thread Starter Shaunrafuse

    (@shaunrafuse)

    Yes sorry lol the Twenty Fourteen theme with the Twenty Fourteen Extended plugin..

    So I have the primary content sidebar to the right using this plugin as well and I want to put one on the left side and have it visible only on posts and pages not on the main page (crowd too much)

    Since you are using a plugin for your changes, I think the best option would to to ask the plugin’s developer about this.

    Thread Starter Shaunrafuse

    (@shaunrafuse)

    Most of the editing was being done via CSS and whatever tools the dashboard had to offer, I just wanted the plugin for a couple things..

    So are you using a child theme for these non-plugin changes?

    Thread Starter Shaunrafuse

    (@shaunrafuse)

    Yup

    Excellent. Now you’ll need to get into some PHP & HTML as well as CSS. ?? I’d suggest starting by creating a new sidebar template file in the child theme called sidebar-left.php. Start off with something simple like:

    <div id="left">
    	<?php if ( is_active_sidebar( 'sidebar-left' ) ) : ?>
    	<div id="left-sidebar" class="left-sidebar widget-area" role="complementary">
    		<?php dynamic_sidebar( 'sidebar-left' ); ?>
    	</div>
    	<?php endif; ?>
    </div>

    in this file. Then you need to register the widgets area in the sidebar by adding:

    function mychild_widgets_init() {
    	register_sidebar( array(
    		'name'          => __( 'Left Widget Area', 'twentyfourteen' ),
    		'id'            => 'sidebar-left',
    		'description'   => __( 'Left sidebar.', 'twentyfourteen' ),
    		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    		'after_widget'  => '</aside>',
    		'before_title'  => '<h1 class="widget-title">',
    		'after_title'   => '</h1>',
    	) );
    }
    add_action( 'widgets_init', 'mychild_widgets_init' );

    to your child theme’s functions.php file. Next, you need to call the new sidebar into your pages using <?php get_sidebar( 'left' );?>. Iof you want this sidebar in every page of the site, the best approach here (rather than creating new copies of every single template file in the parent theme) might be to try adding this line to the very top of your child theme’s footer.php file and see how that goes.

    It’s going to look pretty awful at first as you’ll then need to start working on the CSS to float the sidebar into place and reduce the main content area width but that should get you started.

    Thread Starter Shaunrafuse

    (@shaunrafuse)

    Oh that looks fun ?? your good lol… I’ll get right on it keep ya posted, thanks!!

    Thread Starter Shaunrafuse

    (@shaunrafuse)

    well I seem to have run in to a slight problem esmi.. I don’t have a sidebar to play with (or can’t find it to put text in) and I can see code directly on the site.. Homehealthyfitness.com

    Thread Starter Shaunrafuse

    (@shaunrafuse)

    I’m real fresh to the coding world, not sure what’s going on here… Plugins and the custom CSS manager have been my tools of choice in building the site and still, the CSS skills are limited.. But I’m working on it!

    Thread Starter Shaunrafuse

    (@shaunrafuse)

    This is a problem I have whenever I make a functions.php file and enter text into it. Main reason why I’ve steered more towards the plugins and simple CSS coding.. It’s slightly discouraging but I really want to learn it and get some more pleasing aesthetics to my site.

    Thread Starter Shaunrafuse

    (@shaunrafuse)

    Would you have any idea why the code is showing up on the site???

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘How Can You Add An Additional Sidebar?’ is closed to new replies.