Title: PHP code not working in a PHP template
Last modified: December 8, 2024

---

# PHP code not working in a PHP template

 *  Resolved [swarajaccustra](https://wordpress.org/support/users/swarajaccustra/)
 * (@swarajaccustra)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/php-code-not-working-in-a-php-template/)
 * Hello,
 * I wanted to use a slider on my custom PHP home page template. But when I’m adding
   the php code, all other codes inside get_header() and get_footer() stops showing
   on page. in view source , i can see my codes but they just dont show.
   In mobile
   version, all good. TIA

Viewing 1 replies (of 1 total)

 *  Plugin Support [Robert](https://wordpress.org/support/users/robertnextendweb/)
 * (@robertnextendweb)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/php-code-not-working-in-a-php-template/#post-18186548)
 * Hi [@swarajaccustra](https://wordpress.org/support/users/swarajaccustra/)
 * I assume you are using the PHP do_shortcode publish method:
   [https://smartslider.helpscoutdocs.com/article/1720-publishing-on-wordpress#php](https://smartslider.helpscoutdocs.com/article/1720-publishing-on-wordpress#php)
 * Do you see the slider on the page, and you do not see only the content from get_header()
   and get_footer(), or do you not see anything? Also, could you please share a 
   link to your site, so we can take a look?

Viewing 1 replies (of 1 total)

The topic ‘PHP code not working in a PHP template’ is closed to new replies.

 * ![](https://ps.w.org/smart-slider-3/assets/icon.svg?rev=2307688)
 * [Smart Slider 3](https://wordpress.org/plugins/smart-slider-3/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/smart-slider-3/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/smart-slider-3/)
 * [Active Topics](https://wordpress.org/support/plugin/smart-slider-3/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/smart-slider-3/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/smart-slider-3/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Robert](https://wordpress.org/support/users/robertnextendweb/)
 * Last activity: [1 year, 6 months ago](https://wordpress.org/support/topic/php-code-not-working-in-a-php-template/#post-18186548)
 * Status: resolved