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

Forum Replies Created

Viewing 15 posts - 16,696 through 16,710 (of 18,421 total)
  • Author
    Posts
  • in reply to: Show result in another page #6640
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    It depends on your theme. I believe you will have to edit the search.php file in your theme directory. If you ask the theme developer, he might know which files you exactly need to change.

    in reply to: How can I set which image size the results thumbnail uses? #6637
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    You have two options in this case.

    1. By default the image cropping is disabled to save CPU over bandwith, you can enable it on the Cache Settings submenu: http://i.imgur.com/UIMicxB.png

    2. Don’t use the cropping, nor the original images by adding this filter function to your themes functions.php file:

    [php]
    add_filter( ‘asp_pagepost_results’, ‘asp_get_thumb_image’, 1, 1 );

    function asp_get_thumb_image( $pageposts ) {

    // Possible values: thumbnail, medium, large, or full
    $size = "thumbnail";

    foreach ($pageposts as $k=>$v) {

    $url = wp_get_attachment_image_src( get_post_thumbnail_id($v->id), $size );

    if ( !empty($url[0]) ) {
    $pageposts[$k]->image = $url[0];
    }

    }

    return $pageposts;
    }
    [/php]

    You can change the $size variable in the code to “thumbnail”, “medium”, “large”, or “full”, those are WordPress supported values. I believe the thumbnail is 150×150, the medium is 300×300 and so on..

    If you want smaller than 150×150, then the WordPress codex states that an array of dimensions should be given, like so:

    [code]$size = array(64, 64);[/code]

    I’m not sure if that works though.

    in reply to: Help with Search Variation #6632
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    Luckily you don’t have to alter your titles. The plugin code has a so called “filter point” before and after the search phrase is processed and sent to the database. This allows to create custom codes to make modifications to the search phrase, without actually changing anything in the plugin code.

    I’ve quickly put together a function, that should help you with this. Put this code to your themes functions.php file (it should be in your active theme directory):

    [php]
    add_filter( ‘asp_search_phrase_after_cleaning’, ‘remove_slash_and_r’, 1, 1 );

    function remove_slash_and_r( $phrase ) {
    $temp_phrase = str_replace(array("/", "R"), "", $phrase);

    if ($temp_phrase != $phrase)
    $phrase = $phrase . " " . $temp_phrase;

    return $phrase;
    }
    [/php]

    This code replaces “R” or “/” characters in the search phrase, then compares it to the original. If they are different, then it appends the one without the “R” or “/” characters.
    Basically if the user types in “225/40R18” the search will register it as “225/40R18 2254018”, so it will search for 2554018 as well.

    Let me know how this works!

    in reply to: Show result in another page #6627
    Ernest MarcinkoErnest Marcinko
    Keymaster

    I honestly don’t know, because that results page is independent from the search plugin. It’s the part of your theme. The plugin only replaces the default wordpress search results with the ones it finds.

    I believe you can edit that file in the theme folder, it’s usually the search.php file, but there might be options on the theme settings as well regarding this.

    in reply to: Category Name Filter Not Working #6625
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    I think the $taxonomy is not correct. Try:

    $taxonomy = “design”;

    in lower case. I believe it expects the taxonomy slug, not the actual name, which I suppose is the lower case version.

    in reply to: Products from one category only #6623
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    Can you elaborate more on crazy amounts? That should definitely not happen, as repetitive page loads are cached to prevent further query executions. First page loads are of course heavier, as the plugin looks for related posts within the database based on keywords parsed from the configured fields. For more info you can read about a performance test I concluded on related posts plugin: https://wp-dreams.com/articles/2014/11/related-posts-plugins-performace-measured/

    I can see an error in that query. There are unexpected “&” and “*” characters, which makes it failing. They look like they are part of html entities, and it’s very hard to escape them.

    Since I can’t see FTP access I’ve quickly made a change in my local test environment to the word parser function, to look for more unexpected cases. So far I’m getting positive results on all stress tests.
    I’m attaching this version to this post, please re-install it to your server, save the settings again, and check if these errors appear again.

    If the problem still persists, and you can provide temporary FTP acess as well, I will gladly debug through the code to find the source of the issue. I’m hoping that the attached version will help though.

    in reply to: Show result in another page #6622
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    The Override the default WordPress search results page? option was not activated, thus only the default wordpress search results were displayed.

    Now it should display posts, pages, agents and properties according to the configuration.

    in reply to: Overriding default search and default result spage #6616
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    Unfortunately it’s not possible to just override the default search box layout, and I never said that. The reason is, that each theme uses it’s own form with an own function (in most cases), so there is no universal way of just replacing it without touching the code.

    The only way of replacing the default theme search box is to replace it in the corresponding theme file (usually header.php, depends on theme author). If you want, I can help you with that. If you can also provide temporary FTP details, I can check the theme and try to replace the search in the header with the ajax search pro. (I guess that’s what you want?)

    I’ve checked the search configuration regarding the override. I’ve tried a few options, but it seems like the theme is also overriding the results, as the default search results page looks unusual to me – the theme results page is separated to 3 parts, and I’m guessing it uses 3 different search queries to get those items. The problem with that solution is, that it’s impossible to override it.
    I can take a look at that file as well if you want to, maybe I can restore the default search engine, which would allow ajax search pro to override the results.

    in reply to: Show result in another page #6613
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    You can redirect the search to your themes default search page on the General Options -> Behavior options panel: http://i.imgur.com/8wJinWA.png

    in reply to: Category Name Filter Not Working #6611
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    I think the problem here might be that you are using a custom taxonomy.

    I suppose you are talking about this example: https://wp-dreams.com/knowledge-base/showing-the-category-titles-in-the-result-title/

    This only works with post categories, because for other taxonomy terms a different wordpress function is used. I’ve made a quick modification, that should get the terms of the specified taxonomy:

    [php]
    add_filter( ‘asp_pagepost_results’, ‘asp_add_term_titles’, 1, 1 );

    function asp_add_term_titles( $pageposts ) {
    foreach ($pageposts as $k=>$v) {

    // Edit this to the taxonomy you are using
    $taxonomy = "mytaxonomy";

    // Get the taxonomy terms
    $post_terms = wp_get_post_terms( $pageposts[$k]->id, $taxonomy );
    $terms = "";

    // Concatenate category names to the $cats variable
    foreach($post_terms as $c){
    $term = get_term( $c, $taxonomy );
    $terms = " ".$term->name;
    }

    // Modify the post title
    $pageposts[$k]->title .= " ".$terms;
    }

    return $pageposts;
    }
    [/php]

    Don’t forget to change the $taxonomy variable to the taxonomy you are using with the custom post type.

    in reply to: Some products dont show in search #6607
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    Thank you for the details. I have found the problem and fixed it in the search code. I’m including this fix in the upcoming update, so you don’t have to worry about it 🙂

    in reply to: Plugin storing incorrect home URL #6606
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    The CSS assets are generated upon saving the search option to give the best possible performance. The plugin always uses the plugins_url() call to get the internally defined URL when generating these assets.

    Simply save the search options again to re-generate the CSS files with the correct urls.

    in reply to: Post don't display #6602
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Thank you for the details! I’ve found the problem 🙂

    It was the configuration. The Relevance Options -> Categories Taxonomies -> Should all terms match exactly? option was enabled. It’s a very strict option and is mostly used for site with thousands of posts for better relevance. I’ve turned it off, and the related content started appearing 🙂

    You can remove the shortcode if you want from the content because the Show the plugin under content? is activated on the Layout Options -> Output placement panel, so the plugin is automatically displayed under the content.

    in reply to: Products from one category only #6595
    Ernest MarcinkoErnest Marcinko
    Keymaster

    It looks like the CDN cache is not updated yet. The preview CSS looks changed, but the site CSS is served from cloudfront and it still contains the older changes.

    I’ve enabled the Load inline stylesheets? option on the Compatibility Settings panel, so the CDN minify cache is bypassed, it displays the new styling now. Once the CDN cache is cleared, you can switch it back and it should display the latest changes.

    in reply to: Post don't display #6594
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    – Did you add the shortcode directly to the post content manually or into the theme?
    – Was it working before?
    – Does it display anything if you put it elsewhere?

    I can’t see any HTML code, which either means that there were no related posts found or the shortcode was placed incorrectly, I’m not sure.

    Can you also provide temporary FTP and admin access so I can debug through the issue? You can edit your first post in this thread to add details or you can upload a .txt file.

Viewing 15 posts - 16,696 through 16,710 (of 18,421 total)