Extra Sidebars

Hey,

I have registered some new widget area’s. I would like to add 3 more sidebars. One sidebar for left side and two other sidebars with content depending on the pages.
What files should I copy to child theme, tpl-sidebar? and what should I exactly edit?

thanks

Hey AlbatiQue,

The file you need to edit would depend on where you want the sidebars to appear. If you want them to appear on all Pages, you can edit the page.php file. If you want them on all Posts, you’ll need to edit the single.php file.

Feel free to check the links below for more info on how to add sidebars to a theme.
Adding sidebar link #1
Adding sidebar link #2

Hope this helps! :slight_smile:

Ben

Hey Ben,

I wanted the option to select them from the page attributes. Like the no-header/no-footer page.

thanks

Hi AlbatiQue,

If you want to have sidebars on a per page basis or pick and choose what sidebars appear on what page, post or CPT. I would recommend you install the WooSidebars plugins.

If you want to add functionality to the Page Attributes area, you will need to check out this article which has instructions on how to achieve this - http://code.tutsplus.com/tutorials/how-to-use-custom-sidebars-on-posts-and-pages--wp-25142

Thanks,
Danny

Hey Danny,

Thanks for your answer, I’ve used the plugin you suggested and it works very well :)!

Another question, I have added a background-color to my sidebar and it’s getting next to the page title. I would like the page title to be full witdh and page-sidebar & content come underneath it.

Hi AlbatiQue,

Can you share the URL of the page where this is happening so we can check? :slight_smile:

Ben

Hey Ben,

Well i’m on a local development area.
But on this page exactly the same happens.

The title “extra sidebar” & on right side that sidebar already starts with “Support hours”. I would like to have “Extra sidebar title” fullwidth 12 columns and underneath page content + sidebar.

Hope it’s clear what I want to achieve.

Hi AlbatiQue,

As your is local, is it possible to share some screenshots, please? One showing what you currently have and the other showing what you want to achieve.

Thanks,
Danny

Hey,

I made a quick image to show how I would like it to be :slight_smile:

https://dl.dropboxusercontent.com/u/8275682/Desktop%20HD.jpg

https://dl.dropboxusercontent.com/u/8275682/Desktop%20HD%20Copy.jpg

Hi AlbatiQue,

It’s rather difficult to give you definitive answer, as we can’t see the site. However, can you not add a Row above the area where the content/sidebar is loaded and then manually add your page title via a Header module?

Thanks,
Danny

[Content Hidden]

Hi AlbatiQue,

Are you trying to do this on Posts or Pages? If you’re trying to do this on posts, you won’t be able to using the builder, as it is post and not a page.

To do this on posts, you’re going to need to use a child theme and either add your row/modules via a hook or add the single.php file to your child theme folder. Then use the our shortcode functionality via the do_shortcode function.

You can find use the information on this topic as a starting point - http://forum.wpbeaverbuilder.com/support/q/replace-head-footer-with-saved-global-rows/

Thanks,
Danny

Hey Danny& Ben,

I was able to pull this of using the following code.

add_action('fl_content_open', 'my_global_header');
  function my_global_header(){
   echo '<div class="container"><div class="row"><header class="fl-custom-post-header">
   			<h1 class="fl-post-title" itemprop="headline">';
			 the_title(); 
	echo '</h1></header></div></div>';

 };

One additional thing I would like to add is so it does not show on the homepage (slug=home). I need to do this with if statement or something?

thanks

Hey AlbatiQue,

That would be correct. You can check if the page is the homepage using is_front_page() like so…

add_action('fl_content_open', 'my_global_header');
function my_global_header(){
  if ( ! is_front_page() ) {
    echo '<div class="container"><div class="row"><header class="fl-custom-post-header">
      <h1 class="fl-post-title" itemprop="headline">';
        the_title(); 
    echo '</h1></header></div></div>';
  }
};

Ben

Works perfect! Thanks

No worries! Enjoy BB! :slight_smile:

Ben