Title: Adding Title to sidebar blocks
Last modified: August 20, 2016

---

# Adding Title to sidebar blocks

 *  [mishagos](https://wordpress.org/support/users/mishagos/)
 * (@mishagos)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/adding-title-to-sidebar-blocks/)
 * I’d like to use the blocks option for displaying sidebar1 content, but want a
   title in there too. Where is the title generated?
 * I hard-coded a title into the search box (searchform.php) but I know there’s 
   a simpler way to do it. Theme was generated with Artisteer 3.0 then hacked to
   bits by me.
 * Example:
 * [http://evilgeniuscreative.com/blogexample.jpg](http://evilgeniuscreative.com/blogexample.jpg)

Viewing 11 replies - 1 through 11 (of 11 total)

 *  [Kraignos](https://wordpress.org/support/users/kraignos/)
 * (@kraignos)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/adding-title-to-sidebar-blocks/#post-2155643)
 * > the blocks option
 * ???
 * From the **widgets** admin menu, you can drop custom-menu widgets in your sidebar(
   one for your archive menu, and another for your category menu), if your theme
   allows it. And then specify a title for each one.
 *  Thread Starter [mishagos](https://wordpress.org/support/users/mishagos/)
 * (@mishagos)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/adding-title-to-sidebar-blocks/#post-2155645)
 * Yes, for some reason the titles don’t show up, despite having titles in the widgets.
   That’s what I’m looking for the source of. How do those get generated?
 * If the sidebar option is to display as Posts, the title and all shows. If as 
   blocks, it’s just the block without the title.
 * Thanks
 *  [Kraignos](https://wordpress.org/support/users/kraignos/)
 * (@kraignos)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/adding-title-to-sidebar-blocks/#post-2155652)
 * Okay.
    Just to be sure, check if you can find, in the **functions.php** of your
   theme’s folder, a function named `register_sidebar()`. It should have an array
   passed as a parameter. This array should define, among other options, something
   like this ( `’before_title’ => ‘<h2 class=”widgettitle”>’, ‘after_title’ => ‘
   </h2>’` Maybe the theme uses this to hide the title (don’t know why they’d do
   that, though..)
 *  [Kraignos](https://wordpress.org/support/users/kraignos/)
 * (@kraignos)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/adding-title-to-sidebar-blocks/#post-2155654)
 * The wp function to call sidebars is `dynamic_sidebar("nameOfTheSidebar")`. Should
   be called in your theme’s **sidebar.php**. And defined in your _wp-includes/widgets.
   php_ folder
 * The code is [http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/widgets.php](http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/widgets.php)
   but I think you didn’t go hacking this far.
 *  Thread Starter [mishagos](https://wordpress.org/support/users/mishagos/)
 * (@mishagos)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/adding-title-to-sidebar-blocks/#post-2155655)
 * Thanks, but nope. It’s in the widgets.php file tho.
 * What decides whether something goes ‘before_title’ or after title? Where are 
   those options located both in the db and in the files? Any ideas folks?
 * Thank you
 *  Thread Starter [mishagos](https://wordpress.org/support/users/mishagos/)
 * (@mishagos)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/adding-title-to-sidebar-blocks/#post-2155659)
 * Actually I guess the real question is by what method or system does WP remove
   the titles when choosing a “BLOCK” style for the widgets vs. leaving the title
   in for a POST or SIMPLE TEXT style?
 * Thanks
 *  [Kraignos](https://wordpress.org/support/users/kraignos/)
 * (@kraignos)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/adding-title-to-sidebar-blocks/#post-2155933)
 * > What decides whether something goes ‘before_title’ or after title? Where are
   > those options located both in the db and in the files? Any ideas folks?
 * Errr… like I said, it should be defined by the function `register_sidebar()` 
   or `register_sidebars()` located in **functions.php** on one hand, adding some
   tag before and after the title; and in widgets.php adding the the title itself
   on the other hand.
    Maybe I’m wrong, but I don’t think it’s handled in the db.
 * I just realize Artisteer is not a theme, but a theme generator. I’m gonna DL 
   this in order to investigate a little more, as nobody else answers your question.
 * Also… blocks???? Sorry, really don’t understand what you’re talking about.
 * Regarding posts and pages, titles are managed differently compared to widgets(-
   > within the Loop)
 *  [Kraignos](https://wordpress.org/support/users/kraignos/)
 * (@kraignos)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/adding-title-to-sidebar-blocks/#post-2155934)
 * And could you link your functions.php code to pastebin ? Your theme might be 
   prevented from displaying the tilte by a filter…
 *  [Kraignos](https://wordpress.org/support/users/kraignos/)
 * (@kraignos)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/adding-title-to-sidebar-blocks/#post-2155935)
 * OK just installed Artisteer. Blocks seem to be Artisteer’s specific naming for
   widgets. xD Sorry ’bout that.
 *  [Kraignos](https://wordpress.org/support/users/kraignos/)
 * (@kraignos)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/adding-title-to-sidebar-blocks/#post-2155936)
 * Another way would be to add a custom-text widget above all other widgets you 
   want title on:
 *     ```
       <h2 class="widget-title">Title of the widget</h2>
       ```
   
 * replace the class with the same one applied to “site search” in the screenshot
   you provided. Should do the trick meantime….
 *  [Kraignos](https://wordpress.org/support/users/kraignos/)
 * (@kraignos)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/adding-title-to-sidebar-blocks/#post-2155937)
 * Within the files generated by Artisteer, don’t you have something like this in
   the file sidebar-default.php, or sidebar-secondary.php (…or whatever is yours)?
 *     ```
       <?php ob_start();?>
             <ul>
               <?php wp_list_categories('show_count=1&title_li='); ?>
             </ul>
       <?php theme_wrapper($style, array('title' => __('Categories', THEME_NS), 'content' => ob_get_clean())); ?>
       ```
   
 * Here we can clearly see the title is passed to the function `theme_wrapper()`(
   and eventually translated). Maybe you modified this when tweaking your theme….
 * Don’t see options to hide title directly from the Artisteer application, although.
 * If it doesn’t solve your problem, you may consider asking directly to Artisteer
   forums, as you paid for this.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Adding Title to sidebar blocks’ is closed to new replies.

 * 11 replies
 * 2 participants
 * Last reply from: [Kraignos](https://wordpress.org/support/users/kraignos/)
 * Last activity: [14 years, 10 months ago](https://wordpress.org/support/topic/adding-title-to-sidebar-blocks/#post-2155937)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
