Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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
    Rhoody

    #356574

    Hey 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,
    Ismael

    #357232

    Hi 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.
    Cheers

    #359171

    Hi!

    Problem is dynamic widgets are unidentifiable via PHP code, did you try the plugin we suggested?

    Regards,
    Josue

    #359183

    Josue,
    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
    Rhoody

    #359208

    Hey Rhoody!

    Try changing line 72 in sidebar.php:

    if (dynamic_sidebar('Displayed Everywhere')) : $default_sidebar = false; endif;
    

    Regards,
    Josue

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.