Tagged: search, sidebar, widget area
-
AuthorPosts
-
June 13, 2018 at 12:58 pm #972268
Dear Support Team
Where can I set the sidebar for the search results page?
Best regardsJune 15, 2018 at 12:07 pm #973264Hey Xinspirit,
Thank you for using Enfold.
The search results page uses the default sidebar or the “Displayed Everywhere” widget area. It’s in the Appearance > Widgets panel. Make sure that the Sidebar Settings > Sidebar on Pages option is turned on.
Best regards,
IsmaelOctober 22, 2018 at 10:05 pm #1025146Is there a way to display a special “widget area” (aka sidebar) just for the search result page?
The reason:
I use the “Displayed Everywhere” widget area to display a search form.And therefor I have now twice a search form at the search results page:
one in the sidebar and one on top of the search results.October 23, 2018 at 2:21 pm #1025418Hi,
You can hide the other search bar with css. Would you like that?
Best regards,
IsmaelOctober 23, 2018 at 2:45 pm #1025437Thanks, Ismael, I would like to have a sidebar only for the search results page, where I can put widgets in it, that appear nowhere else.
So “Display Everywhere” is not the right way for me.October 24, 2018 at 2:46 am #1025720Hi,
You can modify the search.php template directly. Adjust the default get_sidebar function and point it to a sidebar with a custom name.
get_sidebar('search-sidebar');
You need to create a new template and name it sidebar-search-sidebar.php.
// https://developer.wordpress.org/reference/functions/get_sidebar/
Or install the Widget Logic plugin.
// https://wordpress.org/plugins/widget-logic/
Best regards,
IsmaelOctober 24, 2018 at 2:55 pm #1025921Thanks, Ismael, but I don’t understand what you mean with “new template”.
Can I create a new “widget area” for the search results page and its widgets and … then what do I need to do next please?
For example I created a new “widget area”, called “area_searchsidebar”, but when I add in search.php as you suggested
get_sidebar('area_searchsidebar');
… nothing happens, my custom sidebar is not shown.
October 25, 2018 at 9:03 am #1026230Hi,
You need to create a new php file inside the child theme and name it according to the value of the get_sidebar function.
get_sidebar('search-sidebar');
The template file should be named.
sidebar-search-sidebar.php.
Have you tried using the Widget Logic plugin? That is much easier if you’re not familiar with templates.
Best regards,
IsmaelOctober 25, 2018 at 11:13 am #1026290thanks for your help, Ismael. I am not familiar with templates, never have understood “Widget Logic” plugin, but I found a similar one with more “visual” and for me easier to understand settings – “Widget Options“, and with that I got it easily to work by creating my desired widgets in the PAGE area and setting them via “Widget Options” to “Search”.
October 26, 2018 at 5:42 am #1026629 -
AuthorPosts
- You must be logged in to reply to this topic.