Couple of questions/problems with setup

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Couple of questions/problems with setup

This topic contains 6 replies, has 2 voices, and was last updated by Johannes42 Johannes42 2 years, 5 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #25943
    Johannes42
    Johannes42
    Participant

    Hey guys,
    I have a couple of questions about the plugin I could not find an answer to anywhere.

    1. I have a couple of custom taxonomies. How do I add a filter that the user can select which taxonomies (categories, tags, custom taxonomies) should be searched? I can only find the option to add the terms of those taxonomies, but not the taxonomies themselves.
    2. I would like to change the behaviour of the search form so that pressing the enter button brings you to the result page. How do I do that?
    3. Highlighting the search term in the search results does not always work. Sometimes its highlighted, sometimes not. Is this a known issue? Anything I can do?
    4. I would like to be able to open the settings via hovering with the mouse on the button, not clicking it. Is there an option to do that?
    5. When displaying taxonomy terms on the search result page, the entry contains a data which is empty, but still shows a little clock icon. Is this from your plugin or something my theme is doing? And can I switch that off somehow?
    6. On mobile devices, the search is not overwriting the WordPress search results.
    7. I use a search bar in the sticky menu of my website. When the user scrolls up again, the sticky menu bar search field is set to display none, because I have a bigger search bar in the header. The problem is that when the result popup is shown when scrolling up, the search bar vanishes, but the popup remains. Its position is changed though, it is moved to the top left of the screen, half cut off. Can I do something about that? It should just vanish instead.
    8. Does ASP install any cookies on the user’s PC?

    Best wishes
    Johannes

    #25950
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    1. That is actually not possible – only taxonomy terms are possible to choose, but not the taxonomies as a whole.
    2. This documentation should help you: Magnifier and Return button events
    3. Make sure to have this option enabled: https://i.imgur.com/GHhWhhY.png
    This should improve the highlighter greatly. It is not perfect, but should work for most cases.
    4. Unfortunately no, the only way to do that is by custom coding.
    5. That is a theme related issue. Themes cannot actually display other than post types as results (wordpress limitation) – the plugin actually converts those objects to taxonomy terms, but of course due to that some issues can occur. I think that icon reserved for the date, but since taxonomy terms does not have creation dates, it stays empty.
    6. I don’t see the search box on the mobile view. Can you please link me to a page where it is visible? Searches initiated via the plugin search bar should work.
    7. You can try enabling this option: https://i.imgur.com/Z5VieNy.png
    The plugin will try to regularly check for it’s visibility, and if detects an invisible container, then hides all related elements as well.
    8. Only on specific configuration, but it warns you when doing so

    Best,
    Ernest Marcinko

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


    #25954
    Johannes42
    Johannes42
    Participant
    You cannot access this content.
    #25966
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    1. Well, this was never requested before – the plugin offers taxonomy term filters, which is what users are usually after. I can add this to the possible features list, but I am not sure if it’s possible, as taxonomies are in relation with post types, and not the actual post objects.

    4. Sure, but I think it might be doable to some extent with a small custom code snippet. I have constructed something that may help. Try adding this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!

    add_action('wp_footer', 'asp_add_to_footer');
    function asp_add_to_footer() {
    	?>
    	<script>
    	jQuery(function($){
    		$('.prosettings').on('hover', function(){
    			var id = $(this).closest('.asp_m').data('id');
    			var instance = $(this).closest('.asp_m').data('instance');
    			ASP.api(id, instance, 'toggleSettings', 'show');
    		});
    	});
    	</script>
    	<?php
    }

    5. Yes unfortunately. It tries to get the actual post content, but it is not available.

    6. Actually, it should. I have been able to replicate this issue on our test servers as well. It is related to the content type filters – they are mistakenly recongized as “unchecked” when searching via the default search bar. In this case it causes the missing taxonomies.
    There is a very simple fix, but a core plugin file needs to be edited for that. If you wish, you can add temporary FTP details, and I can do it for you.

    If you want to fix it manually, then please follow these instructions:
        a) open up the wp-content/plugins/ajax-search-pro/includes/classes/etc/class-asp_helpers.php on your server
        b) scroll to line 1159, it should be:

    self::toQueryArgs_ContentTypes($sd, $o, $args);

        c) change that line to this:

    if ( $o !== false ) self::toQueryArgs_ContentTypes($sd, $o, $args);

        d) save the file, and it is done

    7. No, because that would completely freeze the page due to the loop that repeatedly checks for the visibility. This should be fixed via the integration, this is only the next best solution that can be done from the plugins perspective.

    9. It was due to a misconfiguration, you had content excluded from all users. I have corrected that for you.

    10. The results page is fully controlled by the theme you are using.
    We are rolling out an udpate later this week, that will feature a custom results page feature via Elementor Pro posts widgets.

    Best,
    Ernest Marcinko

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


    #25982
    Johannes42
    Johannes42
    Participant
    You cannot access this content.
    #25992
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    4. It could be actually, but it might be a bit problematic,as accidentally leaving the area will immediately close it. It’s worth a try though. Change the code to this variation:

    add_action('wp_footer', 'asp_add_to_footer');
    function asp_add_to_footer() {
    	?>
    	<script>
    	jQuery(function($){
    		var t;
    		$('.prosettings').on('hover', function(){
    			var id = $(this).closest('.asp_m').data('id');
    			var instance = $(this).closest('.asp_m').data('instance');
    			ASP.api(id, instance, 'toggleSettings', 'show');
    			clearTimeout(t);
    		});
    		$('.asp_sb, .asp_s').on('mouseenter', function(){
    			clearTimeout(t);
    		});
    		$('.asp_sb, .asp_s').on('mouseleave', function(){
    			clearTimeout(t);
    			var _this = this;
    			t = setTimeout(function(){
    				var id = $(_this).closest('.asp_w').data('id');
    				var instance = $(_this).closest('.asp_w').data('instance');
    				console.log(id, instance);
    				ASP.api(id, instance, 'toggleSettings', 'hide');
    			}, 500);
    		});
    	});
    	</script>
    	<?php
    }

    6. Yes, of course, the issue will be patched.
    11. Have these been excluded under the General Options -> Sources 2 panel? Because on the Advanced Options panel the exclusions are for post type results that are in relation with the taxonomy terms.

    Best,
    Ernest Marcinko

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


    #26000
    Johannes42
    Johannes42
    Participant

    Great thanks, that was it. Thanks also for the script!
    Johannes

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

You must be logged in to reply to this topic.