Custom Fields
Re-Envisioned
Support MB Views Run WP shortcode inside Metabox Views

  • Creator
    Topic
  • #28355
    Resolved justdoit123
    Participant

    How to run a shortcode inside the views ?

    my shortcode is [formidable id=1]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #28369
    Long Nguyen
    Moderator

    Hi,

    You can just paste the shortcode to the View, like the WYSIWYG field type or Classic Editor.

    #28376
    justdoit123
    Participant

    Interesting, now how I can run Twig lowercase function for shortcodes

    my use case, the shortcode I am using return the value in upper case.

    I am trying to convert it to lower case, but gives me error. Here is my attempt

    My shortcode is: [shortcode x="yr3"]

    My attempt to convert to lower case:
    {{ [shortcode x="yr3"] | lower}}
    https://twig.symfony.com/doc/2.x/filters/lower.html

    in PHP, It can be done by strtolower
    like
    <?php echo strtolower(do_shortcode('[shortcode x="yr3"]' ));?>

    Thanks

    #28383
    Long Nguyen
    Moderator

    Hi,

    If you want to display the text in lowercase, simply use the CSS code

    div.b {
      text-transform: lowercase;
    }

    Get more details here https://www.w3schools.com/cssref/pr_text_text-transform.asp

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