Forums Forums Search & Filter Pro no terms are showing in dropdown fields

Viewing 9 posts - 11 through 19 (of 19 total)
  • Trevor
    #204665
    This reply has been marked as private.
    Anonymous
    #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
    #204784

    Hello 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
    #204823

    Hi

    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
    #204831

    I 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 27

    Trevor
    #204837
    This reply has been marked as private.
    Trevor
    #204845
    This reply has been marked as private.
    Anonymous
    #204853

    Thank 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! ๐Ÿ˜‰

    Trevor
    #204879

    Great, I will close this thread for now then.

Viewing 9 posts - 11 through 19 (of 19 total)