Sometimes you want to display widgets on your site without the title showing. I know what you’re thinking: You could just leave the titles blank, right? Well yes you could, but what happens when you decide to edit or delete a widget? You’re looking at a bunch of widgets in your WordPress admin and you’re wondering which one is the one you want. This trick allows you to keep the titles, but if you place square brackets around them, they won’t show up in the front end.
Allow the standard WordPress text widget to execute PHP
The built-in text widget or the newer ‘Custom HTML’ widget in WordPress don’t let you use PHP code, only standard HTML. This snippet, when placed in your functions.php file, allows you to execute PHP code that you might want to use in there.
Add Before Sidebar widget area in a WordPress site built with the Genesis Framework
When viewed on a smartphone screen, the default behaviour for the primary sidebar is to appear below the main content area. This is sensible, since you want your most important content to appear further up the page for SEO purposes, and the sidebar is likely to contain your less important content. But there may be times when you want to keep something in the sidebar for desktop users, but you’d like smartphone users to see something in the sidebar before everything else; perhaps a photo or video.
This snippet will create a widget area and hook it in to the genesis_before_content area. Your CSS class (in this case .before-sidebar) should float the content right and use a width that is the same as your main sidebar.
This means desktop users will see your new widget and main sidebar as one big sidebar and will be unaware of the two different widget areas. But smartphone users will see the new widget area above the main content.
