Support » Themes and Templates » My custom widget area does not show in search

  • Resolved christos312


    Hello to everyone,

    I have created a custom widget area and I have include it to all the template pages and works ok with this code

    <div id="leftsid"><?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Left_Sidebar") ) : ?><?php endif; ?></div>

    But when I search something on my WordPress site, in the search results page, the sidebar disappears.

    I tried to find in what page I am redirected to include the sidebar but the url look like this for search…

    And I really don’t know in what page I have to look for and include the coding.

    Anyone have an idea where search form is redirected?


Viewing 9 replies - 1 through 9 (of 9 total)
  • did you register your sidebar in function.php file?

    Yeap, in the function.php in the template folder with the following code

    if ( function_exists('register_sidebar') )
        'name' => 'Left_Sidebar',
        'before_widget' => '<div id = "Left_Sidebar">',
        'after_widget' => '</div>',
        'before_title' => '<h3>',
        'after_title' => '</h3>',

    can u send your template file?
    here is my email

    Which file? The whole template folder? Or the function.php?

    template file in which u want to add your custom sidebar . i think u did not add sidebar in your template file

    I did add it, in the following pages.


    The problem is that when I do a search on my site I am redirected to a different page with the search results.

    On that page the sidebar is disappeared.

    So lets say I am on my home page… I search for “House” when i press search the result page that appears does not have the sidebar, where all the other pages have it…

    add sidebar in search.php or you can make your own search template

    Cool thanks, i didn’t notice the search.php in my template folder -.-

    Thanks again!


Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘My custom widget area does not show in search’ is closed to new replies.