Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   Can't remove new unused sidebar widgets (http://forum.bytesforall.com/showthread.php?t=3564)

paulae Sep 23, 2009 06:08 AM

Can't remove new unused sidebar widgets
 
In my right sidebar, I tried to create a widget area. 3 were created (I know about the reason now, from another thread). I decided not to use any of them, and now they just sit there. How can I remove them?

Flynn Sep 23, 2009 07:08 AM

Do you have access to PHPMyAdmin? If so you could delete the row "bfa_widget_areas" in the table "wp_options" of the database of your Wordpress installation.


Or put this at the bottom of functions.php

<?php delete_option("bfa_widget_areas"); ?>

(without <?php and ?> if you put it somewhere between existing <?php and ?>)

surf to one page of your site to have the functions.php be called and processed at least once, then see if the widget areas are gone, then remove that code from functions.php again

After you surf to a blog page again, the widget areas that you have defined somewhere with bfa_widget_areas(...) will be created again, but the old ones that aren't defined anywhere anymore should be gone

paulae Sep 23, 2009 08:40 AM

OK, thank you. I was able to use phpmyadmin and got rid of the row.

Is this going to be fixed in the next version of the theme? I really, really, really need to be able to easily add widget areas in different spots!

Flynn Sep 23, 2009 10:48 AM

I've added a link "Reset Widget Areas" at the top of Theme Options -> Add new widget areas, which when clicked will delete the option "bfa_widget_areas".

With the next front end page view the currently active widget areas are re-created. Basically what you did now by going through PHPMyAdmin (which of course is too much hassle on a daily basis, I agree)

This should be it for the widget area function unless I missed something.

paulae Sep 23, 2009 10:51 AM

Would this reset button remove all of the new widget areas? That seems a bad idea! I might want to remove only one. Or am I not understanding you?

Flynn Sep 23, 2009 08:52 PM

It would delete all but with the very next page view on any of your pages the widget areas that are supposed to be active (because you've put <?php bfa_widget_area(...); ?> in one of the theme option text areas) will be immediately created again, whereas the old ones will not because you're not using the <?php bfa_widget_area(...); ?> code for those anymore.

So effectively it deletes only those that you wanted to delete

It is like a "Refresh or Update Widgets Areas" function

All custom widget areas disappear for 1 single page view and appear again after that. The widgets inside are still there.

Note this is not 1 page view for every visitor, just the 1st pageview after you've hit the "Delete unused custom widgets" link. You could be the one doing that page view, by refreshing one of your pages.

paulae Sep 23, 2009 09:02 PM

Ah. I get it now. Cool!


All times are GMT -6. The time now is 10:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.