-
AuthorPosts
-
November 24, 2014 at 2:15 am #356420
Gooood morning.
The search results of my page show in the sidebar all pages.
I’d like to have a custom sidebar. (like my news or my latest posts)I know I need to modify the search.php and edit
<?php//get the sidebar
$avia_config[‘currently_viewing’] = ‘page’;get_sidebar();
?>
My problem is, where do I find the name of the custom sidebar I want to have displayed on the search result-page.
In this specific case I created a custom sidebar in the widget area and named it “Dumaguete Sidebar”
this is the sidebar I want to have on the search-results also.thanks for your help in advanced
Cheers
RhoodyNovember 24, 2014 at 7:50 am #356574Hey Rhoody!
Thank you for using Enfold.
Please try to use this plugin and the is_search() conditional function: https://wordpress.org/plugins/widget-logic/
Best regards,
IsmaelNovember 24, 2014 at 11:55 pm #357232Hi Ismael,
thanks for your help.I do admit I am not a big plugin fan, as they always slow down the sites a little bit or break with updates, or or or…
I am almost sure before uploading Enfold latest version I had it done with a easy modification of the search.php (if I remember correct). I simply can’t figure out how
If you think there is any option, please let me know. Apologies for the added request.
CheersNovember 27, 2014 at 8:43 pm #359171Hi!
Problem is dynamic widgets are unidentifiable via PHP code, did you try the plugin we suggested?
Regards,
JosueNovember 27, 2014 at 9:49 pm #359183Josue,
thanks for your reply, nope I did not try the plugin for said reason.Lets try a different approach, can I set the default sidebar to a different one? Everything is better than showing all pages.
Cheers
RhoodyNovember 27, 2014 at 10:38 pm #359208Hey Rhoody!
Try changing line 72 in sidebar.php:
if (dynamic_sidebar('Displayed Everywhere')) : $default_sidebar = false; endif;Regards,
Josue -
AuthorPosts
- You must be logged in to reply to this topic.
