How do I remove the Widgets box?

Hello,

I would like to remove the 'Widgets' box from the bottom of the pages of my site but I can't find what code I would need to delete. Here is a link to the site.

http://www.ryanmediaworks.com

  • JosephLee1179
    • The Incredible Code Injector

    That looks like it is the primary sidebar for that theme. What is the name of that theme. I will download it and see if I can help you.

    Removing that sidebar will remove all the sidebars on the website. There is one present at the bottom of each page. The sidebar should be called "sidebar" in the widgets area.

    If you want the sidebar on every page except the home page, I can tell you how to use css to hide it.

    If you want it completely gone. I need the theme name if you got it from the wordpress library.

  • JosephLee1179
    • The Incredible Code Injector

    By the way. If this theme is not in the wordpress library... If you look at your page.php file, there will be a line that says get_sidebar. It's normally toward the bottom of the document after the wordpress loop etc...

    You need to unregister the sidebar from the functions.php, that will remove it from the widget area in the back and disable it's functionality. Then you need to remove it from your templates.

    Be aware, if your theme has a page.php, a home.php(front-page.php), an archives.php, a single.php, then the get_sidebar will have to be removed from every template, or it will reappear on certain parts of the site.

    After those steps, you need to remove it from the css.style sheet. There are styles in there that have the little lines. If you don't remove it from css, then it will have two lines at the bottom of your site.

  • Patrick
    • Design Lord, Child of Thor

    Thanks very much for the quick response, I really appreciate it!

    The theme is named 'Product,' I found it on the WPMU website. I would like the sidebar to be on the homepage exclusively...not on any of the other pages.

    I do have the files home.php, page.php, archives.php, and a single.php.

    How should I go about keeping the sidebar on the homepage exclusively? Should I still delete it from all of those files?

  • Patrick
    • Design Lord, Child of Thor

    Removing the line from archives.php and from single.php did nothing...the widget box still appeared on every page. When I deleted in in the page.php file as well, the widget box disappeared from every page, including the home page. The line of code is still in home.php though.

  • JosephLee1179
    • The Incredible Code Injector

    Okay, so you removed the get_sidebar from page, archives, single (etc...) everything is working well except you do not have the bottom sidebars on the homepage, which you want?

    I downloaded the theme. There were never three sidebars there. You were seeing them previously because you had a page set as "homepage" in the settings.

    Try to follow me:
    Anytime you make a "page" in the admin area, it uses page.php as a default template. If there is a get_sidebar in that page.php, that sidebar will appear on every page of the website that is created. The exception is when you set a template. If you set a template, you will use the code on that template.

    Home.php is unique. It shows up as your home page by default. If you don't set a homepage then home.php will show up as yourdomain.com (the homepage).

    However, there is a place in the admin that asks you to set a homepage. If you create a page called home (or anything) then set it in this area as the "homepage." Then wordpress will deliver that page as the homepage (yourdomain.com). When you do this you have to set a blog too.

    The sidebar on the bottom of the theme is not on home.php. When you saw it earlier this morning, you must have set a page as the default home page. Thus, it was using page.php. When you deleted the sidebar from page.php, the widget left the homepage (which was NOT home.php, it was page.php).

    The solution is to actually add the sidebar in to the home.php.

    Do you want me to walk you through that?

  • JosephLee1179
    • The Incredible Code Injector

    It's in a really odd place.

    Settings > Reading Front Page and Blog Page are what you want.

    Remember, you have to create a page Home (anything you want to call it) and a page Blog (anything you want to call it) then tell WP those are the pages you want assigned to that role.

  • Patrick
    • Design Lord, Child of Thor

    Ok, when I went there, the proper pages were already selected. I have my front page set as 'Home' and my posts page set as 'blog,' When I go into pages and open up 'Home' (the page i have set as my front page), the 'template' pull down is 'default template'. There is not an option for home.php.

  • JosephLee1179
    • The Incredible Code Injector

    Correct. Now that you have set a page. The front page (homepage) is using the default (page.php) template. If the page.php has the sidebars, then the homepage will have them too.

    If you want the homepage to have the widgets, but the rest of the site not to have the widgets, then we need to do this:

    First, you do NOT want to name a page as the home page in the wordpress settings. We want no page listed as front page, and not page listed as blog.

    Then we have to add the widgets to the home.php.

    <?php if( $bp_existed == 'true' ) { //check if bp existed ?>
    <?php get_sidebar('bphome'); ?>
    <?php } else { // if not bp detected..let go normal ?>
    <?php get_sidebar('home'); ?>
    <?php } ?>

    This is in the Home.PHP file right now.

    <?php get_sidebar('home'); ?>
    <?php get_sidebar('blog'); ?>
    This is what we want to replace that

    I want to make a point that I don't know what the bp function does for this theme. We are effectively removing it from the home page. Now you are using the HomePage widgets (in the middle) and the blog widgets at the bottom. Remember, those widgets at the bottom are going to also be used on the blog page at the bottom too. We didn't create new widgets, we are just using the ones in your theme.

  • JosephLee1179
    • The Incredible Code Injector

    <?php if( $bp_existed == 'true' ) { //check if bp existed ?>
    <?php get_sidebar('bpblog'); ?>
    <?php } else { // if not bp detected..let go normal ?>
    <?php get_sidebar('blog'); ?>
    <?php } ?>

    Remove this from the index.php to remove the widgets from the blog. Then you will have three widgets on the home page that don't show up anywhere else on the site.

    If you want me to write about changing the names from blog widget to something else, like homepage bottom widget, then I can. It's not too complicated, but if you remember that the bottom three widgets are on the homepage now it's not necessary.

  • aecnu
    • WP Unicorn

    Greetings Patrick and JosephLee1179,

    @JosephLee1179 Thank you for your patience with this member which obviously needed some serious help. Some rep points sent your way.

    @Patrick It appears this particular topic is now resolved/closed, if you need any further assistance please let us know.

    If it wasn't resolved, or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Thank you both for being WPMU Dev Community Members!

    Cheers, Joe

  • JosephLee1179
    • The Incredible Code Injector

    Thanks aecnu. I only wish I had known he had set a static page before we started. I would have understood the relation of the widgets to the theme structure earlier then. Cut a lot of grief out for him.

    Thank you for the points!

    I help to help. I definitely want to be a part of the free club though, hahaha.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.