• Resolved Pluribus

    (@pluribus)


    Hi everyone

    I am trying to embed the Revolution slider into a template page (because of the way the template has been built, I cant add it to a page using the wordpress back-end).

    The relevant line in the code is

    <?php echo do_shortcode("SHORTCODEHERE"); ?>

    So I have been trying this

    <?php echo do_shortcode("[rev_slider alias="news-gallery-post-based6"]"); ?>

    But the syntax is wrong and results in a page error.

    Revolution slider gives me the shortcode

    [rev_slider alias="news-gallery-post-based6"]

    I desperately need to get this working tonight as I have been working literally all wekend to get this site live for a client and I am at my wits end trying different combinations of quote marks and apostrophes to get it to work.

    Can anyone help?

    Thanks

    Ian

Viewing 4 replies - 1 through 4 (of 4 total)
  • Change this…
    <?php echo do_shortcode("[rev_slider alias="news-gallery-post-based6"]"); ?>
    to this…
    <?php echo do_shortcode('[rev_slider alias="news-gallery-post-based6"]'); ?>
    ..it is because there are too many double quotation marks, so changing the surrounding doubles to singles should allow the code to work.

    Thread Starter Pluribus

    (@pluribus)

    brilliant, fixed immediately!

    Thank you so much! 🙂

    You’re welcome. You can mark this thread “Resolved”.

    Thread Starter Pluribus

    (@pluribus)

    I will thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Please help with my syntax! (single line of code only)’ is closed to new replies.