Title: Embed in PHP Template
Last modified: August 21, 2016

---

# Embed in PHP Template

 *  Resolved [theamazingaustin](https://wordpress.org/support/users/theamazingaustin/)
 * (@theamazingaustin)
 * [12 years ago](https://wordpress.org/support/topic/embed-in-php-template/)
 * I’ve got a php template page for my landing page and trying to embed with
    “<?
   php echo do_shortcode( “[nemus_slider id=”1970″]” ); ?>” but it’s throwing: “
   Parse error: syntax error, unexpected ‘[‘, expecting ‘)’ in /home/directd/public_html/
   wp-content/themes/DDT_20144/landing.php on line 30”
 * Line 30 being the line with the shortcode. 🙂
 * Thanks!
 * [https://wordpress.org/plugins/nemus-slider/](https://wordpress.org/plugins/nemus-slider/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Viszt Péter](https://wordpress.org/support/users/passatgt/)
 * (@passatgt)
 * [12 years ago](https://wordpress.org/support/topic/embed-in-php-template/#post-4879828)
 * Hi!
 * You have a syntax error, it should be:
 * `<?php echo do_shortcode( '[nemus_slider id="1970"]' ); ?>`
 * Also, you have a function called nemus_slider, so this might be easier:
 * `<?php nemus_slider(1970); ?>`
 *  Thread Starter [theamazingaustin](https://wordpress.org/support/users/theamazingaustin/)
 * (@theamazingaustin)
 * [12 years ago](https://wordpress.org/support/topic/embed-in-php-template/#post-4879832)
 * Much thanks Passatgt!!!
 *  [stevegossett64](https://wordpress.org/support/users/stevegossett64/)
 * (@stevegossett64)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/embed-in-php-template/#post-4879962)
 * Thought I would add to this. If you want to just use it in the header of your
   home page only and not in the headers of other pages use:
 * `<?php if ( is_home() && function_exists('nemus_slider') ) { nemus_slider(1213);}?
   >`
 * It will instantiate the function and the slider number. there is probably always
   a better way of doing something but I just like to share regardless. Hope it 
   helps someone.
 *  [kgannon](https://wordpress.org/support/users/kgannon/)
 * (@kgannon)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/embed-in-php-template/#post-4879967)
 * Hi there im trying to use the slider only in the home page header and i have 
   got problems with displaying the slider.
    once i have inserted this code into
   header php:
 * <?php if ( is_home() && function_exists(‘nemus_slider’) ) { nemus_slider(538);}?
   >
 * and it doesn’t appear on any of my pages including home page,
    any help appreciated.
 * p.s im beginner in php btw 🙁

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Embed in PHP Template’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/nemus-slider_fad5e5.svg)
 * [Nemus Slider](https://wordpress.org/plugins/nemus-slider/)
 * [Support Threads](https://wordpress.org/support/plugin/nemus-slider/)
 * [Active Topics](https://wordpress.org/support/plugin/nemus-slider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nemus-slider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nemus-slider/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [kgannon](https://wordpress.org/support/users/kgannon/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/embed-in-php-template/#post-4879967)
 * Status: resolved