Home Forums Pro Themes University Hub Pro How to replace default "search box" Hub Pro by search box of Ajax Search Lite

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #58602
    rolex523
    Participant

    I recently installed the plugin name “Ajax Search Lite” and I love its search box and search function. But in the front page of University Hub Pro, there is a default button search box at the top right corner (in the menu bar), you can see as the picture here of default searchbox location of University Hub Pro :

    https://drive.google.com/open?id=1xkvY8ixxhn0O5AE1MWn4HyweDGVoDzPf

    And this is the search box of Ajax Search Lite plugin, which I prefer:
    https://drive.google.com/open?id=1g71fWw2W_193calpf_zG-vwdnw58tkly

    How could I replace the default button search by new button search of Ajax Search Lite at the same location on the top right corner of menu bar? Please guide me more details.

    Best regards

    #58649
    wensolutions
    Keymaster

    Hello @rolex523,

    To replace the default search in the header of the theme you have to activate the child theme .

    You can even activate the child theme using the plugin given below :

    https://wordpress.org/plugins/wp-child-theme-generator/

    After activating the child theme in your child theme create the file searchform.php and paste below given code in searchform.php file .

    <?php
    /**
     * Search form.
     *
     * @package University_Hub
     */
    
    ?>
    <div class="search-box-wrap">
    	<?php echo do_shortcode('[wpdreams_ajaxsearchlite]'); ?>
    </div><!-- .search-box-wrap -->

    After pasting the given code go to Admin Panel > Appearance > Customize > Additional CSS and paste below given CSS .

    div[id*='ajaxsearchlite'].wpdreams_asl_container { 
        padding: 9px;
    }

    Hope this helps .

    If you have any issue further, please let us know.

    Best Regards!!

    #58657
    rolex523
    Participant

    Hi, thanks for your reply. I have installed the wp-child-theme-generator pluggin as you guided, and create a new child theme and I see that “Active: University Hub Pro Child” already. See this screenshot below:
    https://drive.google.com/open?id=10dg0wxrCT-QfLlE3rbWFEFXmclKsDeFi

    So in my Thieme there are two different:
    University Hub Pro: Not Activate
    University Hub Pro Child: Activate

    So am I in correct way till this step ?

    And could you guide me more details how and where to create “searchform.php” as you said ? Sorry for bother you because I have no experience in this before.

    Regards

    #58658
    rolex523
    Participant

    Thanks I just figure out it some minutes ago by creating a searchform.php in the root folder of university-hub-pro-child in host cpanel, and add the code to your code to CSS. And it works. Now I have search box of ajax in the menu bar.

    I still have two questions:

    1. For example if I want the new searchbox of ajax not in the same line with menu bar, but in below, and bigger file size as the sreenshot here (see red box), how could I do now ? Because bigger search box in separated line will atrract more people.

    https://drive.google.com/open?id=1AhCdQyeUZ0_rEHWLnDbaAXYiQ3qBYUL7

    2. Because I have installed the University Hub Pro Child so from now on I will use this theme right (instead of UHP) ? And if in the future, UHP updates the themes, so will be my current UHP-Child be updated ?

    Best regards.

    #58659
    wensolutions
    Keymaster

    Hello @rolex523,

    Yes after creating the child theme you need to activate the child theme.

    Now copy above given code locally in any of the text editor then using the FTP, transfer the file to the child theme of University Hub Pro.

    Hope this helps .

    Best Regards!!

    #58662
    rolex523
    Participant

    Thanks I finished creating and get the search box of ajax replace the default box already. But I still have 3 questions above to make clear

    1. For example if I want the new searchbox of ajax not in the same line with menu bar, but in below, and bigger file size as the sreenshot here (see red box), how could I do now ? Because bigger search box in separated line will atrract more people.

    https://drive.google.com/open?id=1AhCdQyeUZ0_rEHWLnDbaAXYiQ3qBYUL7

    2. Because I have installed the University Hub Pro Child so from now on I will use this theme right (instead of UHP) ? And if in the future, UHP updates the themes, so will be my current UHP-Child be updated ?

    3. Could I create searchform.php directly in UHP folder instead of creating new UHP-child ? (that means I change directly in the current UHP without making any child them)

    Hope to receive your feedback about each point above.
    Best regards.

    #58679
    wensolutions
    Keymaster

    Hello @rolex523,

    Your queries has been answered below :

    Query #1:

    Ans : To display the search section above the slider image requires the additional CSS which is beyond the support we offer for our product.

    But if you are fine to display the search section just below the menu section then copy below given code in your child theme functions.php file .

    https://gist.github.com/anonymous/89da3e4f21ee23ac6740376430afc12c

    Query #2,

    Ans: Yes all the future updates that comes to the parent theme will be available in the child theme . If the updates comes then you have to update your parent theme file and automatically the updates will be seen in the child theme as well

    Query #3 ,

    Ans: It is always the bad idea to make any changes directly in your original file as the original modification will be lost .
    Also direct modifications that is done to your child theme will be lost after you update your theme to the latest version . So please go through child theme approach for any modification .

    Hope this helps .

    Best Regards!!

    #58691
    rolex523
    Participant

    Thank you for your reply. I got it and really appreciate your time to help me.

    Have a nice weekend there!

    #58721
    wensolutions
    Keymaster

    Hello @rolex523,

    Glad we could help you !!

    If you have any issues further, please feel free to post your queries and we will happily help you further.

    We will really appreciate if you could help us too by rating our theme in WordPress repo here:-

    https://wordpress.org/support/theme/university-hub/reviews/

    Best regards !!

    Have a great week .

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