Reply To: 4 Unrelated Issues on a New Ajax Search Pro Integration

Home Forums Product Support Forums Ajax Search Pro for WordPress Support 4 Unrelated Issues on a New Ajax Search Pro Integration Reply To: 4 Unrelated Issues on a New Ajax Search Pro Integration


Michael Samson

Hi Ernest,

3. Flicker Problem for Icon Overlay in Isotopic Search Results

I've been busy the past few days with other things, so I didn't get to work on the css just yet. I'm going to try fixing this tomorrow, and I'll get back to you with my results. I may indeed try something like you've suggested here.

Question 1

Thank you for clearing this up. I have both the image caching and search caching enabled, as we are expecting enormous numbers of searches once the platform grows. That's interesting that the database has it's own built-in caching (I did not realize that). But since you did include a separate caching feature here I wanted to make use of it.

I looked at the asp_upload directory and see the cached searches. Thank you for pointing this out to me.

I have three suggestions to help improve these features:

1. I would separate the search results cache from the css styles in the uploads directory. These really belong in separate folders (see my second suggestion on naming).

2. It would be good to rename these folders in the uploads directory so they are more apparent as to their purpose. Perhaps the following would work well:


3. The options in the Caching Options screen could be better named (and described) for clarity as well. I was actually confused by these options when first setting up the plugin. I think the main source of confusion is from the “Crop images for caching” option. When you describe this you talk about disabling the thumbnail generator, which is only what would happen if you turned this option off. The description should really describe what the option does when turned on (it's counter-intuitive).

I would rename the regular caching option (for search results) to “Search Results Caching” and the image caching option to “Image Caching & Cropping”. I would also make it more clear in the description that the image caching and cropping functions are one and the same thing. If this option is turned off, then no caching or cropping of images occurs. This is really a combined feature (please correct me if I'm wrong).

2. Post-Format Filter Missing Default Format (Article)

As promised I am supplying below the code that we used to display the default post-format (Article) in the post-format filters for the Essential Grid plugin. Please keep in mind that this is for Essential Grid and that we had to do this from completely outside the plugin. But I think the general technique would be very similar to what you need to do for this to work within Ajax Search Pro.

I hope this helps you to include the default post format in the filter options (and also keep those default posts excluded when other formats are selected – this is equally important).

/* ############# Essential GRID add Article filter ############# */

 * Function adds one more Essential Grid Filter.
 * @param array $settings
 * @return string
function bbed_set_filter_settings_func( $settings ){
    // Prepend value in the begining.
    array_unshift( $settings['settings']['filter-selected'], 'post_format_STAN0');
    return $settings; 
add_filter('essgrid_set_filter_settings', 'bbed_set_filter_settings_func', 10, 1);

 * Function adds custom filter additional information.
 * @param type $filter
 * @return int
function bbed_set_filter_info_func( $filter ){
    $filter[ 'STAN0' ] = array(
        'name' => 'Article',
        'slug' => 'standard',
        'parent' => 0,
    return $filter; 
add_filter('essgrid_set_filter', 'bbed_set_filter_info_func', 10, 1);

 * Function used to add custom format class details.
 * @param type $terms
 * @param type $post_id
 * @return – Term Details.
function bbed_add_standard_format_terms_details( $terms, $post_id ) {

    $c_terms = get_the_terms( $post_id, 'post_format' );
    if( empty( $c_terms ) ){
        $dummy_term_data = new BBEDArticleTermDetails();
        $terms[] = $dummy_term_data;
    return $terms;
add_filter('essgrid_get_custom_taxonomies_by_post_id', 'bbed_add_standard_format_terms_details', 10, 2);

 * Class returns hardcoded terms details.
class BBEDArticleTermDetails{ var $name = 'Standard', $slug = 'standard', $parent = 0, $term_id = 'STAN0'; }