31 responses to “Disable widget areas (sidebars) without touching theme templates”

  1. Stephen Cronin

    Simple, but great!

    To be honest, I’d hack the theme files and create a mess. I’m really going to try to use functions.php more often now (and move some of my custom plugins into there as well). Thanks for showing the way…

  2. Eduardo Larequi

    Good work, Justin. For some weeks, I had been looking for an easy and understandable explanation of this technique (my skills in PHP are very limited) in order to apply it to my blog. I’ve just published an article with a demonstration: Desactivar la barra lateral sin tocar las plantillas de WordPress. Thank you very much.

  3. Paul

    http://www.livexp.net/wordpress/remove-widget-areas-without-editing-wordpress-template.html

    Dear Justin

    Today I come across the article ( link above) that is exactly like yours in this post.
    So, this is just to let you know.

    I have been reading your blog for awhile and using your wptheme (hybrid) and
    It’s the greatest wptheme around. I admire the way you write code.
    I hope you keep up the good work and be more success in the future.

    Paul

  4. links for 2009-03-19 « On New Media

    [...] Disable widget areas (sidebars) without touching theme templates (tags: wordpress howto widget widgets arb) [...]

  5. WordPress-10 Exceptional WordPress Hacks | Why? Nowhy! DFdou's Blog

    [...] Disable widget areas (sidebars) without touching theme templates [...]

  6. 10 Exceptional WordPress Hacks | Bookmarks

    [...] Disable widget areas (sidebars) without touching theme templates [...]

  7. 10 Exceptional WordPress Hacks « the gypsy

    [...] Disable widget areas (sidebars) without touching theme templates [...]

  8. 10 Cool WordPress Hacks | Knowledge Base eDynamo

    [...] Disable widget areas (sidebars) without touching theme templates [...]

  9. 10 Hacks Per Wordpress Gratis | Sbloggando

    [...] VAI AL SITO » Condividi e Diffondi: [...]

  10. 10 New Wordpress Hacks | Themeflash

    [...] Disable widget areas (sidebars) without touching theme templates Hello Friends! We Regularly post Tutorials, Freebies, Inspirations and other Useful Design Resources.If you are new here, Make sure to Subscribe to our RSS Feed for more Updates. It’s FREE [...]

  11. The Frosty @WPCult

    Wonder how I can disable just one widget on a certain page..

  12. 70 Very Useful Wordpress Hacks & Tricks » De Web Times - Sharing Useful Resources.

    [...] Disable widget areas (sidebars) without touching theme templates [...]

  13. 10 Exceptional WordPress Hacks « Web 2.0.

    [...] Disable widget areas (sidebars) without touching theme templates [...]

  14. smi1ey

    So I tried changing the “['footer']” part of the code to the name of the widget area I need to remove, and nothing happened. I have a suspicion that I need to change more than that in the code. Do I also need to change the “disable_footer_widgets” lines? I’m not sure what to put if that’s the case. I have tried changing it to just “disable_footer_widgets”.

    The title of the widget area I’m trying to remove is “Secondary Sidebar #1″. Any thoughts? I appreciate it! :)

  15. smi1ey

    Oh, and to The Frosty. I would assume if you want this to work on a specific page, you would change the code:

    with “#” being the numerical ID of the page. Although again, this hasn’t worked for me, because the code hasn’t worked on single posts or pages with any method I’ve tried so far. But maybe you’ll be luckier!

  16. Coafuri

    Oau..it’s quite simple. Until now i use a special plugin o do that.

  17. 10 Exceptional WordPress Hacks | 9Tricks.Com - Tips - Tricks - Tutorials

    [...] Disable widget areas (sidebars) without touching theme templates [...]

  18. 10 Exceptional WordPress Hacks « Smashing Magazine

    [...] Disable widget areas (sidebars) without touching theme templates [...]

  19. 10 исключительных WordPress хаков | АртБухта

    [...] Disable widget areas (sidebars) without touching theme templates Добавить в социальные закладки [...]

  20. Albert

    @Coafuri,
    Which is the plugin that you use?

  21. 13 Useful Code Snippets for WordPress Development | Web Design Ledger

    [...] Source [...]

  22. 13 Useful Code Snippets for WordPress Development « HUE Designer

    [...] Source [...]

  23. WordPress functions.php Template with 15 Essential Custom Functions | Digging into WordPress

    [...] Justin Tadlock shares this handy function for removing unwanted widget areas from our theme – a must for customizing existing themes: [...]

  24. wordpress博客主题制作技巧:模板函数妙用 « 小周哥

    [...] Justin Tadlock介绍了个非常方便的函数,可用于删除主题中不需要的小工具区域,这是自定义主题必不可少的一个函数: [...]

  25. 10 Exceptional WordPress Hacks « MalarVizhi

    [...] Disable widget areas (sidebars) without touching theme templates [...]

  26. WordPress functions.php Template with 15 Essential Custom Functions « MalarVizhi

    [...] Justin Tadlock shares this handy function for removing unwanted widget areas from our theme – a must for customizing existing themes: [...]

  27. TradiArt

    This is a really useful tip.

    Let’s suppose that our WP3 site doesn’t support widgets at all: they aren’t necessary.

    How can we remove from the admin menu area, under “Appearance”, the menu “Widgets” also?

    Thank you!

  28. Best Wordpress hacks | devdevote.com

    [...] Justin Tadlock – Disable widget areas without touching themes [...]

  29. Cody

    Hey, why not use the widget logic plugin?

Leave a Reply

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/Web site in attribution.

Please use your real name or a pseudonym (i.e., pen name, alias, nom de plume) when commenting. If you add your site name, company name, or something completely random, I'll likely change it to whatever I want.