Support

Account

Home Forums ACF PRO Repeatable field List with categories / attributes for each item

Helping

Repeatable field List with categories / attributes for each item

  • I’m trying to work out the best way to achieve the following.

    I need to create pages (or posts) that have a list of products in categories which have a sub list of categories / attributes. Each product will have a title, a short description a pack size or weight and an image and needs to go in one or multiple categories. Clicking the product title will show the content description and image in an accordion box below the title. It will not link to an individual page for the item.

    See the image below.

    The left hand menu needs to have a list of types of products with multiple sub-categories / attributes (all editable to suit the category, some sections may just need the categories with no attributes) but each product may need to go in multiple categories, for example a cheddar cheese would go in under Milk Type as cow’s, “Cheese type” cheddar, UK as the country and in the organic section which may not have sub categories. The categories can just be an unordered list.

    I’d prefer to do it using repeatable fields with an option to check the attributes / categories it belongs. They would have to be able to create and edit the categories of course. This way it would be much faster for the admin to manage the content than it would using page types. I’m also hoping to be able to use ajax to load the products from the chosen categories.

    I’m not sure how to implement the above. I know I could use taxonomies and custom post types but it seems to make it much more work for the admin.

  • Don’t know if you’ve thought about this, but this is a perfect candidate for a custom post type and custom taxonomies. This is a good plugin for creating them: https://wordpress.org/plugins/custom-post-type-ui/

    Then you can have one or more custom taxonomies for your categories and it becomes quite a bit simpler to maintain than putting this in either pages or posts. Custom post types and taxonomies can also have their own templates that are automatically used by WP, so then there is no need to the admin to select a special page template to use for a category or a product.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.