• Hello,
    I am trying to run a shortcode within a php code.
    I haven’t the solution yet and the following is what I have got so far and my page turns into a blank canvas.

    Do you know how to run multiple php codes?

    thanks!

    ` <?php
    if ( is_user_logged_in() ) {
    echo ‘.’;
    } else {
    echo ‘

    <?php
    echo do_shortcode(‘[smartslider2 slider=”2″]’);
    ?>

    ‘;
    }
    ?>`

Viewing 1 replies (of 1 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You don’t need to open up PHP (<?php) if you’re already inside it:

    <?php
    if ( is_user_logged_in() ) {
    
     echo '.';
    
    } else {
    
     do_shortcode('[smartslider2 slider="2"]');
    
    }
    ?>

Viewing 1 replies (of 1 total)

The topic ‘Ho to run multiple php functions??’ is closed to new replies.