Title: Adding text widget directly into sidebar.php and sidebar-posts.php
Last modified: September 1, 2016

---

# Adding text widget directly into sidebar.php and sidebar-posts.php

 *  Resolved [chrisrhea](https://wordpress.org/support/users/chrisrhea/)
 * (@chrisrhea)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/adding-text-widget-directly-into-sidebarphp-and-sidebar-postsphp/)
 * Hi, a few months ago you helped me resolve a problem I was having with my widgets
   and I managed to add recent posts and popular posts widgets. I was now wondering
   if you could help me to add a text widget I can’t do it with my normal controller
   as it does not work.
 * Could you please give me the HTML to place into sidebar.php and sidebar-posts.
   php. Also how to place HTML within the the text widget.
 * Thank you so much for your help you are so helpful last time.
 * Cheers
 * Chris

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

 *  Theme Author [acosmin](https://wordpress.org/support/users/acosmin/)
 * (@acosmin)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/adding-text-widget-directly-into-sidebarphp-and-sidebar-postsphp/#post-7527817)
 *     ```
       // Display text widget
       $ac_widget_rp_inst = array( 'title' => 'YOUR TITLE HERE', 'text' => 'YOUR TEXT GOES HERE', 'filter' => true );
       echo '<aside class="side-box clearfix widget ac_popular_posts_widget"><div class="sb-content clearfix">';
       	the_widget( 'WP_Widget_Text', $ac_widget_rp_inst, $ac_widgets_wrap_args );
       echo '</div></aside><!-- END .sidebox .widget -->';
       ```
   
 * I am sorry but that’s the most I can help you. You should really try and use 
   the provided sidebars. If you need simple customization, like this one, you should
   try [https://www.fiverr.com/](https://www.fiverr.com/), it’s really cheap.
 *  Thread Starter [chrisrhea](https://wordpress.org/support/users/chrisrhea/)
 * (@chrisrhea)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/adding-text-widget-directly-into-sidebarphp-and-sidebar-postsphp/#post-7527859)
 * That was perfect thank you!
    I didn’t go into detail but for some reason I cannot
   use the provided sidebars as I’m using a multiple themes plug-in. But thank you
   again for your help.

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

The topic ‘Adding text widget directly into sidebar.php and sidebar-posts.php’ is
closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/justwrite/2.0.3.6/screenshot.png)
 * JustWrite
 * [Support Threads](https://wordpress.org/support/theme/justwrite/)
 * [Active Topics](https://wordpress.org/support/theme/justwrite/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/justwrite/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/justwrite/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [chrisrhea](https://wordpress.org/support/users/chrisrhea/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/adding-text-widget-directly-into-sidebarphp-and-sidebar-postsphp/#post-7527859)
 * Status: resolved