Adding another sidebar to Pique Theme. Help is much appreciated
-
Hello,
I am using the Pique theme for my website and it only has a function of a left sidebar. I’d like to add a right side bar as well. I followed an online tutorial to add a new sidebar widget area which worked great.. I just can’t see to define it to be on either the left or the right..
My stylesheet.css only has the following code as far as sidebars are concerned, which is original, I only switched the content area from right to left:
/* On desktop devices, we'll show a sidebar next to our content */ @media (min-width: 1024px) { .site-content { margin-bottom: 20px; margin-top: 40px; } .site-content .content-area { margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; width: 66%; } .pique-sidebar .content-area { float: left; padding-left: 40px; padding-right: 0; } .pique-sidebar .widget-area { display: block; float: right; font-size: 15.2px; font-size: 0.95rem; padding-right: 40px; width: 33%; } .page-template-template-full-width .content-area { float: none; padding-left: 0; padding-right: 0; width: 100%; } }Now, the tutorial that I followed had me insert the following code into my functions.php (please not that my only addition to this code is titled sidebar-5 since the original theme has 1 left sidebar and 3 footer widget areas):
/** * Register widget area. * * @link http://codex.wordpress.org/Function_Reference/register_sidebar */ function pique_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'pique' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'Add widgets here to appear in your sidebar', 'pique' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h2 class="widget-title">', 'after_title' => '</h2>', ) ); register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'pique' ), 'id' => 'sidebar-5', 'description' => esc_html__( 'Add widgets here to appear in your sidebar', 'pique' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h2 class="widget-title">', 'after_title' => '</h2>', ) ); register_sidebar( array( 'name' => esc_html__( 'First Footer Widget Area', 'pique' ), 'id' => 'sidebar-2', 'description' => esc_html__( 'Add widgets here to appear in your footer', 'pique' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h2 class="widget-title">', 'after_title' => '</h2>', ) ); register_sidebar( array( 'name' => esc_html__( 'Second Footer Widget Area', 'pique' ), 'id' => 'sidebar-3', 'description' => esc_html__( 'Add widgets here to appear in your footer', 'pique' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h2 class="widget-title">', 'after_title' => '</h2>', ) ); register_sidebar( array( 'name' => esc_html__( 'Third Footer Widget Area', 'pique' ), 'id' => 'sidebar-4', 'description' => esc_html__( 'Add widgets here to appear in your footer', 'pique' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h2 class="widget-title">', 'after_title' => '</h2>', ) ); } add_action( 'widgets_init', 'pique_widgets_init' );The next step was to add this code on whatever page i’d like the widgetized area or side bar to be. In this cases I added it to the top of the index.php but I would like to add another in the single.php so that all my posts have another side bar:
<div id="sidebar-5"> <ul> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar-5') ) : endif; ?> </ul> <div style="clear:both"></div> </div>My problem is i’m not sure how to define it in single.php in order to make it appear either on the left or right of the posts…
Any help would be appreciated.. I am an amateur at this and it took me two weeks of research to even be able to come this far! Thank you WordPress community :)
The blog I need help with is: (visible only to logged in users)
-
caskbrothers.com is hosted by GoDaddy.com, not by wordpress.com
That site is not hosted by wordpress.COM and as it is not on our servers we cannot help you with it.
WordPress.COM and WordPress.ORG are completely separate and have different username accounts, logins, features, run different versions of some themes with the same names, and have separate support documentation and separate support forums. Read the differences here http://en.support.wordpress.com/com-vs-org/
This is wordpress.COM support. We provide support only for wordpress.COM hosted sites. Our support docs do not apply to
(1) local installs of wordpress.ORG software on your own server or
(2) wordpress.ORG software installs on paid hosting, and we do not provide support for them at wordpress.COM.
(3) sites linked to wordpress.COM accounts with the Jetpack plugin so they display on the My Sites wordpress.com account page.The wordpress.ORG login link is here https://login.wordpress.org/ If you do not have an account yet then click Create an account https://login.wordpress.org/register/ and if you have lost an account password click Lost password? https://login.wordpress.org/lostpassword/
Some Jetpack solutions are here http://jetpack.com/support/
Others are in the Jetpack support forum at WordPress.org
http://wordpress.org/support/plugin/jetpackHowever, if help cannot be found at either one then they can file a Jetpack support ticket here > http://en.support.wordpress.com/contact/?jetpack=needs-service
WordPress.org support docs are at https://codex.wordpress.org/Main_Page
See also https://apps.wordpress.org/support/ for app support. -
These forums are for sites hosted on WordPress.com, but you’re running the WordPress software on your own hosting. If you need further help with the self-hosted version of Pique, feel free to post in its forum at WordPress.org:
https://wordpress.org/support/theme/pique
You’ll need a free WordPress.org account to post – if you don’t already have one, you can register here:
https://wordpress.org/support/register.php
Be sure to provide a link to your site when you post so people can help you more easily.
- The topic ‘Adding another sidebar to Pique Theme. Help is much appreciated’ is closed to new replies.