Run WP shortcode inside Metabox Views

Support MB Views Run WP shortcode inside Metabox ViewsResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #28355
    justdoit123justdoit123
    Participant

    How to run a shortcode inside the views ?

    my shortcode is [formidable id=1]

    #28369
    Long NguyenLong Nguyen
    Moderator

    Hi,

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

    #28376
    justdoit123justdoit123
    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 NguyenLong 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 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.