Custom Fields
Re-Envisioned
Support MB Views add attributes to mb views shortcode

  • Creator
    Topic
  • #23123
    Resolved Marek Lange
    Participant

    Hi,
    I wonder is it possible to extract shortcode attributes in mb-view template editor.
    For example using [ mbv id="3000" foo="bar" ]

    I have tried:
    {% mb.shortcode_atts(array('foo'=>'default'), $atts); %}
    but it breaks wordpress. My knowledge of twig is minimal and i cant find good examples beside simple loops or printing values.

    Finally i want to pass category id to view by shortcode attribute. To reuse template for different content, same look. Is there a better way to do it? Shortcodes will be used in elementor page.

    Thank you.

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