wordpress if statement error not inserting php code required -


i "trying" work on wordpress site coming against issue if/else statement. below code:

 <?php    if(is_page(9)):  'get_new_royalslider(1)';      else:   echo '<p>other content</p>';      endif;          ?> 

i trying insert php code given royalslide . doing part right ? can else content load in other pages part working.

thanks

changing code to

<?php    if(is_page(9)):   echo get_new_royalslider(1);      else:   echo '<p>other content</p>';      endif;       ?> 

or

<?php    if(is_page(9)):   echo do_shortcode('[new_royalslider id="1"]');   else:   echo '<p>other content</p>';      endif;       ?> 

should fix problem. either way should work you.


Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -