Support » Plugin: Beautiful taxonomy filters » Including Filters in a page

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jonathandejong

    (@jonathandejong)

    Hi Sofian,

    Yes you can use the plugin like in the linked website.
    That’s pretty much what it does.

    However you need to yourself have setup at least one CPT and one or more taxonomies connected to this CPT. From the sound of it you’re looking to add the filters from a static page. You would then have to add the cpt slug as a parameter of the action.

    <?php do_action('show_beautiful_filters', 'posttypeslug'); ?>

    Yes, the posttypeslug was the missing point here, thank you very much

    Plugin Author Jonathandejong

    (@jonathandejong)

    No problem!

    Best of luck in your project.

    Marcel

    (@shimaiceng)

    Hello!

    I´ve added the filter in a static page where I display some custom posts. Everything is working fine… except: The number of the posts beside the taxonomy name is always displayed as “0”. (After filtering, when I jump to the archive page, the number is shown correctly.)

    What can I do?

    Marcel

    Plugin Author Jonathandejong

    (@jonathandejong)

    Hi Marcel,

    In the future please create a new topic for your issues.
    Have you added the post type slug to the do_action?

    Also, there’s an issue where the theme or another plugin might do a custom wp_query somewhere before the call to <?php do_action('show_beautiful_filters', 'posttypeslug'); ?> and NOT properly resetting the query data wp_reset_postdata() and/or wp_reset_query (if query_posts where used, which it shouldn’t). Make sure that’s not what’s happening here 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Including Filters in a page’ is closed to new replies.