Hierarchical filter

Support MB Views Hierarchical filterResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #27413
    JamesJames
    Participant

    Hi, Metabox.

    I am building a restaurant menu and I want to filter it in the front-end. Do you have any tutorials where I can add a hierarchical filter? For example, I want to click the button "dinner menu" it will show "category" then when I click the category item it will show the list of menu items. I would like to use the views in Metabox.

    #27422
    Long NguyenLong Nguyen
    Moderator

    Hi,

    You can follow this article to know how to filter posts by taxonomy https://metabox.io/filter-posts-custom-fields-custom-taxonomies-archive-pages/

    Or use the plugin FacetWP to create a filter quickly https://facetwp.com/. We also have a plugin that integrates Meta Box and FacetWP https://metabox.io/plugins/meta-box-facetwp-integrator/.

    #27423
    JamesJames
    Participant

    Hi, I got an error.

    Warning: Use of undefined constant ‘justread_filter_archive’ - assumed '‘justread_filter_archive’' (this will throw an Error in a future version of PHP) in /home/kirbkobs/main.mywebsite.com/wp-content/themes/Thedemozone/functions.php on line 52

    #27435
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Please change code of the action hook

    add_action( 'pre_get_posts', ‘justread_filter_archive’);

    to this

    add_action( 'pre_get_posts', 'justread_filter_archive' );

    the issue on the single quote character '

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.