This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Forum Replies Created

Viewing 15 posts - 1,501 through 1,515 (of 18,418 total)
  • Author
    Posts
  • in reply to: terms filter on custom page #52477
    Ernest MarcinkoErnest Marcinko
    Keymaster

    All right, I have a possible solution!

    1. First off, you need to put a custom code snippet into the functions.php file in your theme directory:

    add_filter('asp_query_is_search', function($is_search, $wp_query){
    	if ( isset($wp_query->query_vars) && isset($wp_query->query_vars['asp_override']) ) {
    		return true;
    	}
    	return $is_search;
    }, 10, 2);

    This will listen to an additional query parameter and trigger an override to the loop when detected.

    2. In your loop template replace these lines:

    $args = array(
    	'post_type' => 'product', // Ensure you're querying WooCommerce products
    	'post__in' => $product_ids_array,
    	'orderby' => 'post__in', // Preserve the order from the JetEngine query
    	'posts_per_page' => -1, // Adjust the number of products as needed
    );

    with this:

    if ( isset($_GET['p_asp_data']) ) {
    	// Query arguments to signal Ajax Search Pro for override
    	$args = array(
    		'post_type' => 'product',
    		'asp_override' => true,
    	);
    } else {
    	// Original WP_Query arguments
    	$args = array(
    		'post_type' => 'product', // Ensure you're querying WooCommerce products
    		'post__in' => $product_ids_array,
    		'orderby' => 'post__in', // Preserve the order from the JetEngine query
    		'posts_per_page' => -1, // Adjust the number of products as needed
    	);
    }

    This will trigger the signal, whenever a live search query is detected.

    3. Finally, add the asp_es_3 CSS class to the the product-card loop container, like so: https://i.imgur.com/i927SBK.png
    This ensures that Ajax Search Pro knows where the template is rendered so the replacement is made correctly.

    That’s it, this should do the trick!

    in reply to: terms filter on custom page #52475
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Sure! No worries, I’m looking at possible solutions on our test servers that’s why I didn’t answer yet. I will let you know in an hour. Looks to be possible from what I can see for now 🙂

    in reply to: terms filter on custom page #52466
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    Sure, I will try to assist with this.

    If the page is an archive page, then it’s super easy, you can enable the archive page live loader features.

    If this is not an archive, then can you let me know how exactly these loops were created? Are they coded directly within the theme via WP_Query or any different solution?

    in reply to: Disable result link (click action) #52465
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Oh, okay!

    In that case it would the the best to simply unset the results links via a custom code:

    add_filter( 'asp_results', 'asp_custom_link_results', 10, 1 );
    function asp_custom_link_results( $results ) {
        foreach ($results as $k=>&$r) {
    	$r->link = '';
        }
        return $results;
    }

    Try adding this code via the Code Snippets plugin or to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.

    in reply to: Refund #52459
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

    in reply to: Disable result link (click action) #52458
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    The easiest and simplest way to do it is by using this custom CSS:

    .asp_r .item {
        pointer-events: none !important;
    }

    This will prevent any clicks on the browser level, without making any modifications on the plugin code.

    in reply to: Search ACF text fields content not only titles #52456
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You are welcome, thank you for your kind words 🙂 I’m usually not that fast, but I do my best.

    You can find the placeholder option here: https://i.imgur.com/yVcCiXU.png

    If you like the plugin and have not rated already, feel free to leave a rating on the wordpress plugin repository, it’s greatly appreciated.

    in reply to: Search ACF text fields content not only titles #52452
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    Thank you very much for your kind words and all the details, I really appreciate it!

    I quickly logged in and checked the settings, you did a great job, it’s almost set up perfectly. I have went to the index table settings, and selected some of the custom fields to be indexed from the ACF field group, as I assume those are the ones you are looking for.

    I tested some of the content after re-indexing, and it seems to be picking up the keywords from those fields now.

    in reply to: want to show author name in filter instead of email. #52450
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    Thanks for the details, it helps a lot!

    If I see correctly the authors are a custom taxonomy “author”. That means that those are the term names. I think the best and safest course of action is to rename them manually in the “author” taxonomy editor – so changing the terms from email to the author names. Ajax Search Pro will automatically show those updated terms.

    in reply to: What to show if multiple categories are selected #52447
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Sure!

    I tried that as well on the New Products search, and I’m getting the results in the preview: https://i.imgur.com/B4nvfzN.png

    in reply to: ELEMENTOR LIVE FILTER NOT WORKING #52446
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You are very welcome!

    in reply to: Live search quit working #52445
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

    in reply to: ELEMENTOR LIVE FILTER NOT WORKING #52442
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Not the hosting company, I don’t think they can do anything about this.

    This must be caused by either a modification in the .htaccess file, a custom code snippet or a plugin, or maybe even a theme option somewhere – this is not normal WordPress feature.
    – If you have added any custom code snippets recently, check those first
    – If no luck, try looking up the theme settings, specifically around search features. If there is any option related to that, it should be something like “search permalink structure” or “custom search permalink” or “seo friendly search url” – something like that. I have seen that in a theme before, so it’s a possible cause.
    – If still no luck, try switching the theme first, to see if that changes anything.

    in reply to: Live search quit working #52440
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Thanks!

    I checked the error console, and the plugin script files are not accessible from the cache directory. It was either deleted or the server permissions may have changed.
    Please make sure that the wp-content/cache and the wp-content/cache/asp directories exist and the permissions are set correctly to 0755 and are accessible. WordPress automatically generates these, but in some cases if they are deleted, it may no longer have permissions to re-create them.

    Alternatively, if you can’t change that, then make sure to change these options, which will bypass the cache directory: https://i.imgur.com/8JNhj7w.png

    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 15 posts - 1,501 through 1,515 (of 18,418 total)