• Kevin

    (@kevinkazoun)


    Hello,

    I was wondering if there’s a way to close the get_sidebar() function.

    I’m currently modifying a template made by a colleague which uses Ajax to load search results so it carries over the sidebar to the results page, which does not work out very well.

    Help would be much appreciated.

    Thanks for being a great community!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi KevinKazoun

    you can remove the following line from page.php and index.php from the theme you are using
    <?php get_sidebar() ?>

    A better idea would be to give us a link to your site
    to understand better the problem

    Thread Starter Kevin

    (@kevinkazoun)

    Hi Nos_kamaru

    Thanks for taking the time to help me.

    Unfortunately I’m not sure if I’m allowed to link the site.

    Basically there’s a get_sidebar(‘Sidebar’); in index.php

    There’s also a searchcode.php which contains everything necessary to perform the Ajax search.

    The ajax search replaces a part of the home page with the search results

    Though, it still copies the sidebar from the index.php even though there’s no get_sidebar(); in searchcode.php simply because of the Ajax search that ‘consumes’ a part of the homepage(or index.php).

    So basically I’m looking for a way to remove the earlier get_sidebar(‘Sidebar); in the searchcode.php, though I’m not even sure if that’s possible.

    Thanks again for taking your time to help

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    So basically I’m looking for a way to remove the earlier get_sidebar(‘Sidebar); in the searchcode.php, though I’m not even sure if that’s possible.

    Can you post a link to the theme? Many themes have a default search box that can be replaced or turned off just by adding a widget.

    Thread Starter Kevin

    (@kevinkazoun)

    Hello Jan

    Thanks for taking your time to help aswell!

    The theme would be:
    https://gorillathemes.com/demo/smoothpro/

    As you can see, when you search something using the Real Estate Search it will still show the sidebars like ‘Contact Us’ and ‘Follow us on Facebook’.
    The Real Estate Search has a different position in the website I’m working on so I would like those widgets to be removed, but I really am lost on how to do that now.

    If i remove get_sidebar(‘Sidebar’); in the index.php it’ll be removed on the results page, but also on the homepage which is not what I want. I want the sidebar(and widgets) to be displayed on the homepage, but not the results page.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Nice looking theme, I was hoping it’d be one of the ones here… ??

    You could remove get_sidebar('Sidebar'); but that would probably break the layout (as you’ve mentioned).

    In the theme’s functions.php file may be the default set for the sidebar but you really should ask at the Gorilla Theme’s support forum for help like that.

    Part of the fee you paid for that theme included support, no sense in not availing yourself of that option. ??

    Thread Starter Kevin

    (@kevinkazoun)

    Hey Jan,

    I like this theme too, though I would’ve prefered to work with a free theme + a real estate plugin. Unfortunately the choice was not mine ??

    Unfortunately the people who want me to make this website only bought the essentials package, which does not include forum support.

    Thanks for your help though, I’ll give it a go!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Close get_sidebar() ?’ is closed to new replies.