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

How to display terms image ? second

Home Forums Product Support Forums Ajax Search Pro for WordPress Support How to display terms image ? second

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #3276
    supermansuperman
    Participant

    Hi,
    https://wp-dreams.com/forums/topic/how-to-display-terms-image/#post-3225
    Thank you for your help. As last ticket that it doesn’t work. I have provided my FTP information and Key. you need to ues WinSCP to access.

    functions.php location:
    …../app-root/data/themes/CP/functions.php

    Term field and edit feld location:
    https://drive.google.com/file/d/0B4BrGeTR-ESZWGx1Z2xYNV9vT1k/view?usp=sharing

    Host name = Ftp server URL
    Private key file= Attachments
    Passphrase for key = Ftp Password

    Best
    Ken

    #3278
    supermansuperman
    Participant

    Hi,
    For security reason that I can’t upload ppk file. so I send you via email.

    Best
    Ken

    #3279
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Thanks, got them.

    Just needed a minor modification, the final code is:
    [php]
    add_filter( "asp_results", "asp_pods_image_results", 1, 1 );

    function asp_pods_image_results( $results ) {

    foreach ($results as $k=>$v) {
    // get the term images
    if ($results[$k]->image != null && $results[$k]->image != "")
    continue;
    $pod = pods("stores");
    $pod->fetch($results[$k]->id);
    $icon = $pod->get_field("icon");
    if ($icon != null && $icon != "")
    $results[$k]->image = $icon;
    }

    return $results;
    }
    [/php]

    It should work now.

    #3280
    supermansuperman
    Participant

    Great! It work. thank you!

    What variable affects the speed of dropdown ? Because I see other website can display result real time ,like Amazon.com .But it’s too slow to show results after I type keyword in my Aja search bar( I have set 2 for Minimal character count to trigger search). The hosting CPU, RAM or something else ?

    How can I do to make it display real time like Amazon search bar ?

    Best
    Ken

    #3281
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Well there are lots of different factors to this:

    1. Amazon is using a custom built software with an highly optimized database
    2. Their servers worth billions of dollars on a dedicated distributed network cluster
    3. Their search engine probably uses different dedicated server networks with an optimized and indexed database with different layers of caching

    And that’s just 3 things. A wordpress powered website will never ever come even close to the speed of an amazon or imdb like search engine. For instants speed you will need a much better database architecture than wordpress, a much better specialized (non generic) cms built for your purposes and an insanely fast server.

    I know people kind of expect that speed because they are used to it from google, amazon, imdb etc.., but it’s not possible within the limits of a simple wordpress installation. It might be possible without it – with a custom build software (preferably not written in php) and with a better database engine. WordPress is a great solution to skip these steps as it provides a comfortable CMS system, but the speed is usually the price.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘How to display terms image ? second’ is closed to new replies.