Trying to get a royal slider into a hero section

adam's Avatar

adam

12 May, 2020 03:27 PM

HI, trying to get a royalslider to appear in a hero section: code is:

if( get_post_meta( get_the_ID(), 'hero_type', true ) == 'full' ) {
    echo '<div class="hero parallax">
     <div class="hero__image">

ROYALSLIDER SHOULD GO HERE

</div>
     <div class="hero__content">
     <div class="hero__va">
     <div class="hero__vc" data-pos="center">
     <div class="container' . ( $fastwp_sima_text_color == 'black' ? '' : ' light-content' ) . '">
     <div class="row">
     <div class="column col-8 offset-2 text-center">
     <h2 class="hero__intro__text">' . wp_kses( get_post_meta( get_the_ID(), 'hero_title', true ), array( 'span' => array( 'class' => array() ) ) ) . '</h2>
     </div>
     </div>
     </div>
     </div>
     </div>
     </div>
     </div>';

I can't seem to get it to load. When I put in "echo get_new_royalslider(1);" I just get the text "echo get_new_royalslider(1);" on my page.

What am I doing wrong?

  1. Support Staff 1 Posted by Dmitry Semenov on 12 May, 2020 06:59 PM

    Dmitry Semenov's Avatar

    Hi,

    Something like:

    echo '<div class="hero parallax">
         <div class="hero__image">
    
        ' . get_new_royalslider(1) . '
    
         </div>
    ...
    </div>
    ';
    

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • Screen_Shot_2020-05-12_at_11.26.22_AM.png 147 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac