Feature request: Adding Views using code

Support MB Views Feature request: Adding Views using codeResolved

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #20708
    badabingbredabadabingbreda
    Participant

    I use MB quite often for plugin development and for that I always add CPT's taxonomies and Custom Fields in the plugin code because that gives me complete control. I also generate the Twig templates to render stuff, but since the addition of MB Views I am really hoping for a coded solution to generate those as well.

    Seeing all the settings are stored to a custom post type, it must be possible to initialize a rule by code as well.

    If this is already possible, can you give me some guidance on how to create such rules. If not possible yet, please consider adding it.

    Wouldn't it be wonderful to be able to add CPT functionality and the way it renders AND a way to maintain it by a plugin alone?

    #20717
    Long NguyenLong Nguyen
    Moderator

    Hi Didou,

    You can use the proxy mb to run a PHP function which is created by you or supported by WordPress in View. Please follow this documentation for more information https://docs.metabox.io/extensions/mb-views/#running-php-functions.

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