Title: Enable PHP when editing only one page
Last modified: October 2, 2017

---

# Enable PHP when editing only one page

 *  Resolved [mat63](https://wordpress.org/support/users/mat63/)
 * (@mat63)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/enable-php-when-editing-a-pages/)
 * Hi,
 * I have to say first that I’m really pleased with the theme.
 * I would like to add a sample of php code in one of the pages.
    «<?php echo do_shortcode(‘[
   smartslider3 slider=4]’); ?>» It’s a slider I want to add but only for one page.
 * With the hooks, it works perfectly. The problem is that it’s displayed on every
   pages. So I tried to add the code directly on the page «petites annonces» using
   the function «shortcodes» then «Shortcode After Header» but the code doesn’t 
   seem to work. I think only xhtml/css/JS works.
 * How can I do ?
 * Thank you very much !
    -  This topic was modified 8 years, 8 months ago by [mat63](https://wordpress.org/support/users/mat63/).
    -  This topic was modified 8 years, 8 months ago by [mat63](https://wordpress.org/support/users/mat63/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fenable-php-when-editing-a-pages%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Theme Author [oceanwp](https://wordpress.org/support/users/oceanwp/)
 * (@oceanwp)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/enable-php-when-editing-a-pages/#post-9550088)
 * Hello, thanks for the nice words 🙂
    It is a shortcode so you just need to add
   this “[smartslider3 slider=4]” in “Shortcode After Header”.
 *  Thread Starter [mat63](https://wordpress.org/support/users/mat63/)
 * (@mat63)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/enable-php-when-editing-a-pages/#post-9555369)
 * Thanks it works perfectly 🙂
 *  Theme Author [oceanwp](https://wordpress.org/support/users/oceanwp/)
 * (@oceanwp)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/enable-php-when-editing-a-pages/#post-9555382)
 * You’re welcome 🙂

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

The topic ‘Enable PHP when editing only one page’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/oceanwp/4.1.6/screenshot.png)
 * OceanWP
 * [Support Threads](https://wordpress.org/support/theme/oceanwp/)
 * [Active Topics](https://wordpress.org/support/theme/oceanwp/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/oceanwp/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/oceanwp/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [oceanwp](https://wordpress.org/support/users/oceanwp/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/enable-php-when-editing-a-pages/#post-9555382)
 * Status: resolved