Forums › Forums › Search & Filter Pro › no terms are showing in dropdown fields
- This topic has 18 replies, 2 voices, and was last updated 5 years, 8 months ago by Trevor.
-
Anonymous(Private) March 11, 2019 at 5:53 pm #204767
Thank you Trevor, fixed and working! Now I have a problem translating the search form.
I followed the instructions here
https://searchandfilter.com/documentation/3rd-party/wpml/
so I made post type translatable, made the Italian translation of the search form. Since it had a different ID, I thought duplicating the template part.
When i try to add the php snippet (<?php get_template_part(‘search-filter/results-it’); ?>) in my page and save it I got blank page with the following fatal error. :-O
Any ideas? Many thanks!
_______
Fatal error: Uncaught Error: Call to a member function get() on null in /home/socage88/public_html/dev/wp-content/themes/thefox_child_theme/search-filter/results-it.php:27 Stack trace: #0 /home/socage88/public_html/dev/wp-includes/template.php(706): require() #1 /home/socage88/public_html/dev/wp-includes/template.php(653): load_template(‘/home/socage88/…’, false) #2 /home/socage88/public_html/dev/wp-includes/general-template.php(157): locate_template(Array, true, false) #3 /home/socage88/public_html/dev/wp-content/plugins/insert-php-code-snippet/shortcode-handler.php(65) : eval()’d code(1): get_template_part(‘search-filter/r…’) #4 /home/socage88/public_html/dev/wp-content/plugins/insert-php-code-snippet/shortcode-handler.php(65): eval() #5 /home/socage88/public_html/dev/wp-includes/shortcodes.php(325): xyz_ips_display_content(Array, ”, ‘xyz-ips’) #6 [internal function]: do_shortcode_tag(Array) #7 /home/socage88/public_html/dev/wp-includes/shortcodes.php(199): preg_replace_callback(‘/\\[(\\[?)(xyz\\-i…’, ‘do_shortco in /home/socage88/public_html/dev/wp-content/themes/thefox_child_theme/search-filter/results-it.php on line 27
_____Anonymous(Private) March 11, 2019 at 8:22 pm #204784Hello again, in the meantime, keep working on it, I realised that, apart showing blank page after saving, it does save and in frontend view it seems to work in both languages.
So, I think I just need to fix blank window with error in backend, that’s it! thank you very much! Good evening. ๐Trevor(Private) March 12, 2019 at 9:33 am #204823Hi
When using the shortcode method, the results.php file can be named:
results.php
OR (for example):
1234.php
Where the form ID would be that number. This gives you the opportunity to translate the templates, once you know the ID number of the translated form, make a template to match that number, in the search-filter sub folder and translate it.
Anonymous(Private) March 12, 2019 at 9:51 am #204831I get the same error. ๐
I named the English template 22063.php and the Italian template 22096.php.
Of course I changed the get_template_part function as well, matching the file name.
Did I understand correctly?
thank you!
_______
Fatal error: Uncaught Error: Call to a member function get() on null in /home/socage88/public_html/dev/wp-content/themes/thefox_child_theme/search-filter/22096.php:27 Stack trace: #0 /home/socage88/public_html/dev/wp-includes/template.php(706): require() #1 /home/socage88/public_html/dev/wp-includes/template.php(653): load_template(‘/home/socage88/…’, false) #2 /home/socage88/public_html/dev/wp-includes/general-template.php(157): locate_template(Array, true, false) #3 /home/socage88/public_html/dev/wp-content/plugins/insert-php-code-snippet/shortcode-handler.php(65) : eval()’d code(1): get_template_part(‘search-filter/2…’) #4 /home/socage88/public_html/dev/wp-content/plugins/insert-php-code-snippet/shortcode-handler.php(65): eval() #5 /home/socage88/public_html/dev/wp-includes/shortcodes.php(325): xyz_ips_display_content(Array, ”, ‘xyz-ips’) #6 [internal function]: do_shortcode_tag(Array) #7 /home/socage88/public_html/dev/wp-includes/shortcodes.php(199): preg_replace_callback(‘/\\[(\\[?)(xyz\\-i…’, ‘do_shortcode_ta in /home/socage88/public_html/dev/wp-content/themes/thefox_child_theme/search-filter/22096.php on line 27Anonymous(Private) March 12, 2019 at 11:12 am #204853Thank you Trevor, great to speak to you too! ๐
Error messages gone!
Now I remember why I did not use the shortcodes, because before I had my template files named differently and did not work, also at the beginning weren’t in a folder named search-filter, and I thought that the only choice was using get_template_part. Now it works like a charm. And you know what? It works more beautifully in Ajax!
Great plugins and thanks for your endless patience!
Have a nice day! ๐ -
AuthorPosts