Forum Replies Created
-
AuthorPosts
-
Ernest Marcinko
KeymasterHi!
Please try updating the plugin by following the safe update guide, in case you were using an older version: https://wpdreams.gitbooks.io/ajax-search-pro-documentation/content/update_notes.html
Ernest Marcinko
KeymasterHi!
Unfortunately not possible. Visually it would be, but the processing is only built for checkboxes only. So by changing the layout, the script will still be unable to process the input. Select, radio, multiselect variants are planned in plugin version 5.0.
Ernest Marcinko
KeymasterHi!
I’m guessing it was either a site, CDN or browser cache issue, unrelated to the plugin. If you are using W3TC or any other page cache engine, make sure to empty the page cache and update the query string and reload the page with CTRL+F5 to empty the browser cache as well.
The search instance dynamic CSS is generated to 1 file for much better performance. If the browser caches too aggresively the changes might not appear after saving at first refresh. Webkit browsers like chrome or safari have crazy strong cache engine on CSS files, so I usually refresh with CTRL+F5 multiple times just in case.
Ernest Marcinko
KeymasterHi!
Make sure you deactivate and activate the plugin to refresh the activation options. Transfering through to different protocols can be a pain with WordPress.
Then open the search settings and save them, that will re-create the stylesheets with the https items.
Some options may have been deleted through the transfer process, so I also recommend opening and saving the Cache settings and Compatibility settings submenus as well.
Ernest Marcinko
KeymasterHi!
Thank you for your kind words!
I’ve added the following custom CSS code to the search custom CSS section to force the selected font on all areas of the search:
[code]div[id*=ajaxsearchpro],
div[id*=ajaxsearchpro] * {
font-family: ‘Karla’, sans-serif !important;
}[/code]It should display in this font now 🙂
October 14, 2015 at 11:42 am in reply to: Show title tag instead of page name in search results #6228Ernest Marcinko
KeymasterHm, maybe it needs to be filtered with the “the_title” filter.
Try changing that code to:
[php]
add_filter( ‘asp_results’, ‘asp_get_seo_title’, 1, 1 );function asp_get_seo_title( $results ) {
foreach ($results as $k=>$v) {
// Continue if not pagepost
if ($results[$k]->content_type != "pagepost") continue;// Get the seo title
$seo_title = get_post_meta($results[$k]->id, ‘_yoast_wpseo_title’, true);// Modify it
if ($seo_title !== false && $seo_title != "")
$results[$k]->title = apply_filters( ‘the_title’, $seo_title );
}return $results;
}
[/php]Ernest Marcinko
KeymasterOh god, the WPML again. That plugin is going to haunt me in my dreams I swear.
So I did some debugging, and it turns out, that the function provided by WPML support to get the language of the post by ID is not working, because why not. It was the last thing I was thinking of, I was looking for mistakes in my code, but apparently it’s not my fault this time. The internal WPML function was returning incorrect or no language information, which was later stored in the Ajax Search Pro index table.
I googled around, and found a post by a WPML staff member to a function that will return the language information of a post. Turns out that does not work either. So after examining my test environment and the WPML database tables I came up with a (hopefully) working solution.
I changed the index table code a good bit to implement this new function, which I hope is working correctly. I’ve already re-created the index table, so please test the search again. It should now return the results in the correct, current language as it supposed to do normally 🙂
I hope this solution works, and I can implenent it to the upcoming version finally.
Ernest Marcinko
KeymasterHi!
I think I know why. When I copy/pasted the code here, the apostrophes were changed for some reason, so there is a syntax error.
Please correct the code to this: http://pastebin.com/raw.php?i=jC0z47Qt
I have tested it from the console, and it should be working once it’s corrected.
Ernest Marcinko
KeymasterHi!
You can edit your initial post in this thread or upload a .txt file with the details. Both methods are safe and visible only to me and you.
Ernest Marcinko
KeymasterHi!
Actually this is better, because it’s update proof. Local changes can get overwritten easily with an update process. Moreover the plugin JS is compressed and built after testing. Unfortunately this solution was only tested in few browsers, it might be impossible to clear the placeholder on some versions.
I’m not able to see the website, I’m getting this red screen: http://i.imgur.com/yT7AYio.png
Can you please check it?
Ernest Marcinko
KeymasterHi!
It’s an IOS feature, and it’s not preventable unfortunately. There are two ways to get around it globally.
1. Setting the input font size over 16 pixels. The mobile safari then will decide not to zoom in, as it’s sufficiently big. (plugin Theme Options -> Input Field Layout -> Search input font option)
2. Using a no-scale meta tag in your site header. You can try putting this meta tag to your site header.php file:
[html]<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />[/html]
There is no Javascript or any other programmatical way of preventing it yet.
Ernest Marcinko
KeymasterHi!
It’s not a bug, this is the default browser behavior on placeholder text.
Try using this custom script in your site header or footer to remove the placeholder when the input is focused:
[code]
<script>
jQuery(function($) {
$(‘input.orig’).focus(function(e){
if ($(this).attr(‘placeholder’) != "")
$(this).attr(‘placeholder_temp’, $(this).attr(‘placeholder’));
$(this).attr(‘placeholder’,"");
}).blur(function(){
$(this).attr(‘placeholder’,$(this).attr(‘placeholder_temp’));
});
});
</script>
[/code]-
This reply was modified 10 years, 8 months ago by
Ernest Marcinko.
October 12, 2015 at 6:34 pm in reply to: Show title tag instead of page name in search results #6207Ernest Marcinko
KeymasterI have come up with something that might just work.
If the SEO title is set on the Post editor, then it’s probably possible to get it as post meta. Try putting this code to your themes functions.php file (to the bottom):
[php]add_filter( ‘asp_results’, ‘asp_get_seo_title’, 1, 1 );
function asp_get_seo_title( $results ) {
foreach ($results as $k=>$v) {
// Continue if not pagepost
if ($results[$k]->content_type != "pagepost") continue;// Get the seo title
$seo_title = get_post_meta($results[$k]->id, ‘_yoast_wpseo_title’, true);// Modify it
if ($seo_title !== false && $seo_title != "")
$results[$k]->title = $seo_title;
}return $results;
}[/php]I havent tested this code, but I’m hoping it will work.
Ernest Marcinko
KeymasterHi!
After a few hours (!) of debugging I found that for some yet unknown reason some of the Enfold layout builder shortcodes are not registered in Ajax requests. I’m nor sure if this is a global theme issues, or just your case, or some misconfiguration.
The best solution would be to ask the theme author how to enable the “av_section”, “av_heading” and all the other shortcodes in ajax requests as well. It’s probably either a minor bug or a configuration issue. I’m 100% sure that those shortcodes must exist in ajax requests, otherwise every ajax powered plugin that queries posts contents will fail.
Otherwise I can only suggest 2 “hack” solutions.
1. I’ve put the following code at the end of the theme functions.php file:
[php]// Force to return the shortcode content only
function x12_return_just_content($atts, $content) {
return do_shortcode($content);
}// Force to return an empty string
function x12_return_empty_content($atts, $content) {
return "";
}add_action( ‘asp_before_search’, ‘x12_empty_unregistered_shortcodes’);
function x12_empty_unregistered_shortcodes() {
// The list is incomplete!add_shortcode( ‘av_hr’, ‘x12_return_empty_content’ );
add_shortcode( ‘av_image’, ‘x12_return_empty_content’ );
add_shortcode( ‘av_button’, ‘x12_return_empty_content’ );
add_shortcode( ‘av_two_third’, ‘x12_return_just_content’ );
add_shortcode( ‘av_heading’, ‘x12_return_empty_content’ );
add_shortcode( ‘av_one_half’, ‘x12_return_just_content’ );
add_shortcode( ‘av_one_full’, ‘x12_return_just_content’ );
add_shortcode( ‘av_one_third’, ‘x12_return_just_content’ );
add_shortcode( ‘av_three_fourth’, ‘x12_return_just_content’ );
add_shortcode( ‘av_one_fourth’, ‘x12_return_just_content’ );
add_shortcode( ‘av_section’, ‘x12_return_just_content’ );
add_shortcode( ‘av_textblock’, ‘x12_return_just_content’ );
}[/php]2. Another solution is shorter, but it removes the undefined content. In case, you can replace that code with this:
[php]
// Force to return an empty string
function x12_return_empty_content($atts, $content) {
return "";
}add_action( ‘asp_before_search’, ‘x12_empty_unregistered_shortcodes’);
function x12_empty_unregistered_shortcodes() {
add_shortcode( ‘av_section’, ‘x12_return_empty_content’ );
}[/php]I don’t fancy either of these solutions, but unless there is a way to turn on the registration of the layout editor shorcodes in ajax requests, I don’t think there is any better way.
Ernest Marcinko
KeymasterThe video tutorial is just been uploaded, see here: https://www.youtube.com/watch?v=EG4JJbdDzbA
-
This reply was modified 10 years, 8 months ago by
-
AuthorPosts