Forum Replies Created
-
AuthorPosts
-
Ernest Marcinko
KeymasterHi!
The ajax url was incorrect. Fixed through the plugin editor, didn’t need the ftp. Thank you.
Ernest Marcinko
KeymasterHi!
This sounds like the image field does not actually contains the image url, but something else. The MIME type error indicates that the browser interpeted it as text, which usually means, that the image url is incorrect.
Moreover the url “http://www.afsdp.org.pe/leguia-la-historia-oculta/610/” is definitely not an image url, it just points to one of your pages.
After diggin up some old tickets I found a similar issue solved for someone. The ACF actually does not store the image url, but the image ID. Thus you need some post-processing function in order to make it work.
This is what solved the issue for him. Put the following code into your themes functions.php file:
[php]
add_filter( "asp_result_image_after_prostproc", "asp_cf_image", 1, 1 );function asp_cf_image( $image ) {
if ($image != "" && strlen($image) < 10) {
$atts = wp_get_attachment_image_src( $image );
if (isset($atts[0]))
return $atts[0];
return null;
}
return $image;
}
[/php]Ernest Marcinko
KeymasterHi!
It looks like something is caching the stylesheet file. I checked the source and it’s changing, so it’s writeable. Maybe it’s just extended browser caching. Anyways I turned on the Inline styles option on the plugins “Cache Settins” submenu. This way the styles are applied to the header directly and should be visible immediately.
Ernest Marcinko
KeymasterHi!
Currently only regular custom fields (for posts, pages, and custom post types) are supported due to the very different structure of buddypress.
Are you using any plugin for custom fields or the built in ones? I’m currently working on the upcoming version of the plugin, I can add your request to the list if you want to. I can’t promise the implementation, but I can try.
Ernest Marcinko
KeymasterYes I do, but it’s not possible to do with the same search instance. By excluding a category will exclude both the category and the posts as well.
Ernest Marcinko
KeymasterIt should return categories, it must have been only the cache. Please try again.
Ernest Marcinko
KeymasterOn the “Advanced Options” panel, “Exclude categories” option: http://i.imgur.com/E4xdgaJ.png
Ernest Marcinko
KeymasterSure, you can have those settings of course. If you check the “Frontend Search Settings -> General” panel, you can choose which custom post types you want to show. Also make sure you have the “Show search settings switch on the frontend?” enabled on the same panel as well.
Ernest Marcinko
KeymasterIdeed, there was something wrong. I activated/deactivated debug mode and now it works.
Ernest Marcinko
KeymasterHi!
It’s because that is only for the fronted search settings box, it does not actually exclude the category, it only makes it invisible on the frontend. To exclude the category go to the Advanced Option panel, and there you can do it. It’s all explained in the documentation.
I already excluded the Hidden Category so you should not see the posts from there now.
Ernest Marcinko
KeymasterHi!
The debugging process revealed that the priorities table was not created. Your designer might have missed a step, he should have deactivated the plugin before uploading. After deactivating/activating it again the necessary table has been created and the plugin should now work fine.
Ernest Marcinko
KeymasterHi!
Please carefully follow the steps of safe update described in the first chapter of the documentation, or you can also find it in the knowledge base: https://wp-dreams.com/knowledge-base/updating-from-older-versions/
Ernest Marcinko
KeymasterThat’s most likely because the function I got from the other plugins documentation might not work as I expect (or not exist at all) and the function fails, thus throwing an error. I suppose that the “fifc_get_tax_thumbnail” function does not exist or does not work, or a different function is used.
If you can ask the plugin developer how to retrieve the featured category image based on it’s ID, then all we need to do is replace that line in my code with that, and it’s going to work.
Ernest Marcinko
KeymasterHi!
The only solution is to use a custom filter function. I did a quick search on that plugin, and did a basic code based on this documentation: http://helpforwp.com/plugins/featured-images-for-categories/
Try to put this code to your themes functions.php file:
[php]
add_filter( "asp_results", "asp_cfi_image_results", 1, 1 );function asp_cfi_image_results( $results ) {
foreach ($results as $k=>$v) {
// get the category images
if ($results[$k]->image != null && $results[$k]->image != "")
continue;
if ($results[$k]->date == null || $results[$k]->date == "")
$results[$k]->image = fifc_get_tax_thumbnail( $results[$k]->id, "category", "thumbnail");
}return $results;
}
[/php]If the documentation is correct, then this should work. Please note however that I can’t provide 3rd party plugin support, so you might need to check with the plugin developer for the correct function to retrieve the category images. (if his documentation is incorrect or his code changed)
Ernest Marcinko
KeymasterHi!
This is actually a hard coded thing in the current version, but with a very quick modification you can change the order. If you open up the wp-content/plugins/ajax-search-pro/search.php file and go to lines 342-351, you should see this:
[php]
} else {
$results = array_merge(
$alltermsresults,
$blogresults,
$allbuddypresults["activityresults"],
$allcommentsresults,
$allbuddypresults["groupresults"],
$allbuddypresults["userresults"],
$allpageposts
);
[/php]As you can see the $alltermsresults variable is merged into the results sooner than anything. Let’s move that variable to the end and the terms will appear after the contents:
[php]
} else {
$results = array_merge(
$blogresults,
$allbuddypresults["activityresults"],
$allcommentsresults,
$allbuddypresults["groupresults"],
$allbuddypresults["userresults"],
$allpageposts,
$alltermsresults
);
[/php]Save the file. The terms should appear now after the regular results.
-
AuthorPosts