• Resolved terzag

    (@terzag)


    Hello,
    I’ve installed the plugin and configured the default filter but when I try to add the shortcode ([annasta_filters preset_id=1]) to a part of my website, nothing is displayed.

    Any idea?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author annastaa

    (@annastaa)

    Hello terzag,

    Where do you add the shortcode, are you perhaps trying to put it directly into a php file? In that case, use the do_shortcode function to echo the shortcode, like so:

    echo do_shortcode( '[annasta_filters preset_id=1]' );

    In case your php file is a template, please pay attention to the above piece of code being enclosed between the <?php and ?> brackets.

    Other things to check / try if the filters do not get displayed:

    1. Make sure that the part of page into which you are inserting the shortcode is being displayed
    2. Set the Display on setting of the filters preset settings to “All pages”
    3. Try inserting the filters with the help of the annasta Filters widget on the Appearance > Widgets page of your WP admin
    4. If all the above don’t work, go to the filters preset settings page, set the Visibility to Controlled by “Filters” button, save the settings, and then reload the shop page to see if the “Filters” button gets displayed anywhere above the products list
    Thread Starter terzag

    (@terzag)

    To be more specific, I’m trying to build a custom search form for WooCommerce. I have a div at the top of the page to display the options, which would be the products filter generated by your plugin.

    In that div, I’m trying to display the shortcode by echoing do_shortcode in PHP.

    1. The part of the page where I put the shortcode (the div) is properly displayed and exists on all pages.
    2. Display of the filter on is set to “all pages”.
    3. I don’t use the sidebar/widgets on my custom theme.
    4. I’ve tried to set the visibility to be controlled by the filters button but I don’t see anything new displayed.

    Plugin Author annastaa

    (@annastaa)

    terzag,

    Have you checked if other shortcodes work in the same div? For example, something like

    echo do_shortcode( '[gallery]' );

    Do any images get displayed if you put it in place of the annasta_filters shortcode? (provided that you have at least one picture in your wp media library)

    Thread Starter terzag

    (@terzag)

    Yes, other shortcodes display fine. Actually, I’m already using a different products filter plugin that displays fine through a shortcode at the same place. I’m checking yours to see if it’s better (I’ve disabled the other plugin for my tests, in case there would be some kind of conflict).

    Plugin Author annastaa

    (@annastaa)

    I see, this is indeed rather weird! Terzag, can you please share a link to your site and send me a zipped archive of your theme to support|_at_|annasta.net for me to do some tests?

    Thread Starter terzag

    (@terzag)

    Sorry, I can’t share the address of the site which is currently in development or the theme (which is specifically designed for a client and not public).

    I’ll look into this a bit more when I have time to do specific tests. My initial interrogations were if the shortcode method was still valid and/or if there were specific options to set, in case the installation instructions on the plugin page were outdated.

    Plugin Author annastaa

    (@annastaa)

    It’s a pity, but I understand. The shortcode works well with most of the themes, so there is obviously some kind of theme / another active plugin incompatibility issue which I would be very much interested in investigating.

    If it’s not too much trouble, please let me know if you ever get to looking into this yourself and figure out the reason for this strange behavior!

    Plugin Author annastaa

    (@annastaa)

    Hello terzag,

    Your issue may have been resolved by the latest (1.3.0) version of our plugin. I will mark this as resolved, but you are always welcome to start a new thread with any further questions.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Filters not displaying’ is closed to new replies.