[Support request] Reveal card

Home Forums Support [Support request] Reveal card

Home Forums Support Reveal card

Viewing 5 posts - 16 through 20 (of 20 total)
  • Author
    Posts
  • #316331
    Tom
    Lead Developer
    Lead Developer

    The WP editor can do that sometimes, especially with javascript.

    You could turn the button into a shortcode:

    add_shortcode( 'flip_button', 'tu_flip_button' );
    function tu_flip_button() {
        ob_start();
        ?>
        <button onclick="document.querySelector('#flip-toggle').classList.toggle('flip');"class="button transparent crni">Nazad</button>
        <?php
        $ret = ob_get_contents();
        ob_end_clean();
        return $ret;
    }

    Then you could do this:

    [flip_button]

    #316506
    Nikola

    How to create shortcode? Like a script in footer hook or?

    Sory for disturbing.

    Thanks.

    #316530
    Leo
    Staff
    Customer Support
    #316630
    Nikola

    Ok, thank you very much guys!

    Best regards
    Nikola

    #316751
    Leo
    Staff
    Customer Support

    Glad we could help!

Viewing 5 posts - 16 through 20 (of 20 total)
  • You must be logged in to reply to this topic.