Custom Fields
Re-Envisioned
Support MB Views Hierarchical filter

  • Creator
    Topic
  • #27413
    Kirb
    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #27422
    Long 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
    Kirb
    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 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 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.