Questions and feature requests

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Questions and feature requests

This topic contains 10 replies, has 2 voices, and was last updated by

6 years, 4 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
  • #5229


    Hi there,

    Awesome plugin so far!
    I just got a few questions and feature requests:

    • How can I disable the result to be shown in a scroll able little box or at least change the height? I use vertical result and just want to expand the result box length to e.g 600px and infinite (for “block” layout, just infinit and for hover just as height as the screen is)
    • Which class is used for replacing the core wordpress search? Because I have a searchform that is not replaced by ajax search (just have a look into the menubar in the provided url)
      <div id="menu-search">
      			<form role="search" method="get" class="search-form" action="'.home_url( '/' ).'">
      					<i class="fa fa-search"></i>
      					<input type="search" class="search-field" placeholder="" value="" name="s" data-swplive="true" title="Search for:" />
      				<input type="submit" class="search-submit" value="Search" />

    Feature requests:

    • Ability to use author avatar as result image. I use a custom post type, that is like a forum. So I want to display the avatar of the topic/answer in the result
    • Ability to customize the “group” name of custom post types in the ordering. E.g my cpt is “Knowledgebase”, but I want to display “Knowledgebase Articles”. For bbpress its possible to change it…
    • Use suggested search terms based on the e.g the most popular searches last day/week/month or simple the last search terms

    Waiting for you answer 🙂


    • This topic was modified 6 years, 6 months ago by  gitbench.
    • This topic was modified 6 years, 6 months ago by  gitbench.
    • This topic was modified 6 years, 6 months ago by  gitbench.


    Can you please have a look?



    Why is my post ignored? :/



    Thank you for the kind words!

    Sorry for the late answer, I’ve been working a bit too much on the upcoming version release and go too many tickets/mails as well with bugs and issues.

    1. If I remember correctly there is a scrollbar issue related with the current version and I think in this thread I solved it, but I think I had to make changes in the code as well.

    I can only fix this via FTP, but I don’t want to ask for access unless necessary. I have a better idea/solution. I’m attaching a pre-alpha version of the upcoming 4.1 to this post, which already has this issue fixed.
    All you need to do is deactivate and delete the current and install this one.
    Some features are not completely finished or tested, so you if you experience issues, just re-install the old version.

    Also, you can try to increase the “Results box viewport (in item numbers)” option on the Theme Options -> Vertical Results panel if you still experience this problem after upgrading.

    If you rather not update, let me know and we proceed from there.

    2. There is no such class. This is a bit complicated issue, I don’t want to get into every exact detail, but it’s not possible. Mainly because there is no standard way for developers to “output” the default search, and everyone is using a different way. The result is that there is no one standard solution that works with each and every theme. Most of the modern themes are using completely different method outputting the search form making it impossible to replace.

    The only way is to replace the source code directly with the search php shortcode. In your case, maybe something like this should work:

    <div id="menu-search">
        <?php echo do_shortcode('[wpdreams_ajaxsearchpro id=1]'); ?>

    As your requests:

    1. That is a good idea. Added to the future features list.
    2. Yes, I’m going to re-work the grouping section to a better one. In the meantime you can use the editable template files, they were introduced in version 4.0. With these template files you are able to directly change the HTML output of results and groups.
    In your case if you open the plugins/ajax-search-pro/includes/views/results/group-header.php file, there will be a bunch of comments for explanation and a single line of code:

    <div class="asp_group_header"><?php echo $group_name; ?></div>

    If you change that to:

    <div class="asp_group_header"><?php echo $group_name; ?> Articles</div>

    then the “Articles” string is going to be displayed after the group name.

    3. Also a good idea. I’m adding this to the future features TODO list. There is a good chance I’m implementing this as well.

    Let me know if you have any questions.

    You must be logged in to view attached files.
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)




    Thanks for your reply, very appreciate your reply!


    1. I installed the beta version and the issue seems to be fixed. But I have some new one (see below)
    2. Thanks, thats working great

    Feature Requests:

    1. Thank you! Would be very awesome, if you could add this into version 4.1!
    2. Is it update resistant? Or do I have to copy the file into my theme directory?
    3. Would also be awesome to see it in 4.1!

    New issues

    1. Result box is now highter, but smaller:
    2. How can I hide the search icon? (May add “Magnifier position” -> none)
    3. Like menationed in the question 2. I built a own shortcode. Its working fine so far, but I have one problem: The box closed even when I focuse it. You can tell me the css to keep the box open, when the input filed is focused or the setting is hovered?
    4. What are the new functions in 4.1?

    Thank you again!

    • This reply was modified 6 years, 6 months ago by  gitbench.
    • This reply was modified 6 years, 6 months ago by  gitbench.
    • This reply was modified 6 years, 6 months ago by  gitbench.




    Hi again!

    1. “Higher but smaller” – smaller in which dimension? The items are smaller?
    2. with a small CSS snippet:

    .promagnifier {
        display: none;

    3. This is a bit more complicated issue. I can see you are using custom CSS to keep the search open if the visitor hovers over the “#menu-search” element. This works fine with child elements.
    The settings and the results elements are not siblings, children nor adjacent to the menu item, therefore it is not possible to target them with CSS. Another problem is that there is no delay to define in css, when the user hovers between 2 different elements. The only possible solution I can see here is some kind of custom javascript code.
    Here is a basic solution, which might work:

    var t;
    $( "#menu-search, .vertical.ajaxsearchpro, .ajaxsearchpro.searchsettings" ).hover(
      function() {
          'width': '250px'
      }, function() {
        t = setTimeout(function(){
            'width': '0'
        }, 1500);

    However you will have to think through all possibilities and action and the expected turnout as well. This is just a very basic solution, it might get much more complicated.

    4. I will make a blog post once it’s finalized.

    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)




    1. Here is a image of the small result:

    New issue:

    • Warning: Division by zero in /wp-content/plugins/ajax-search-pro/includes/bfi_thumb.php on line 780
    • Which function to you use, to get images in the content of a post?
    • When I click into the search field in the menu search, the icons disappear… (

    Would be awesome, to see the author image in search result thing in the next update 🙂

    Thank you 🙂

    • This reply was modified 6 years, 6 months ago by  gitbench.
    • This reply was modified 6 years, 6 months ago by  gitbench.
    • This reply was modified 6 years, 6 months ago by  gitbench.





    Push again



    I just got an email of your response, I’m pretty sure I responded like two weeks ago, but it looks like it got lost somehow. I’ll ask the hosting provider if they did any rollbacks, yours might not be the only answer that got lost. I’m sorry about that.

    Where did that error message occur? Did it repetitively occur, or was it in an error log? I’m not sure I can re-create the error, but I can try to add a check statement for zero division.

    The plugin should parse the image from the post content automatically if it’s not finding the featured image. Is the image directly in the content, or is it added with a shortcode?

    The search closed automatically because of a custom CSS rule. I remember I checked your site and found it, but I don’t recall what the rule was. I tried to check now, but the plugin seems to be inactive and hovering over the icon does nothing.
    The problem with your approach is that you are using a menu element, which contains the search. When the user hovers over the search icon, the actual search bar is opened, and the “:hover” state is still active. However when clicking into the search box the “:hover” state is no longer active so the bar goes back to the 0 width as defined in your CSS rule. There is no way of telling the icon to stay opened if the input is focused, because there is no way of selecting parent elements in CSS.
    That’s why I suggested that partial JS solution, but there was this one CSS rule I found that didn’t work with it.

    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.