• Resolved Eilonwy926

    (@eilonwy926)


    I need guidance on inserting a shortcode into a template.
    I’ve read the instructions, but that shows only a very simple shortcode.

    I want a lightbox to display some instructions about account creation. It has to go into the template because it’s going on the login page.

    Do I put the entire contents of both lightbox codes into the template with echo do_shortcode( '[shortcode here]' ); ?

Viewing 1 replies (of 1 total)
  • Thread Starter Eilonwy926

    (@eilonwy926)

    So for anyone who finds this thread: I figured out that yes, you put the entire contents of both shortcodes into the template.

    I generated the shortcode I wanted on a blank page, so I had something to copy and paste. Then I added these two things to my template:

    <?php echo do_shortcode( '[su_lightbox type="inline" src="#name-of-lightbox"]Text of the link goes here[/su_lightbox]' ); ?>
    and

    <?php echo do_shortcode( '[su_lightbox_content id="name-of-lightbox" width="100%" margin="0px" padding="0px" background="#ffffff" shadow="0"]
    What you want the lightbox to say goes here
    [/su_lightbox_content]' ); ?>
    • This reply was modified 4 years, 8 months ago by Eilonwy926.
Viewing 1 replies (of 1 total)
  • The topic ‘Shortcode in template: Need guidance’ is closed to new replies.