Title: Paste php code in theme&#8217;s file
Last modified: September 30, 2022

---

# Paste php code in theme’s file

 *  Resolved [panseluta](https://wordpress.org/support/users/panseluta/)
 * (@panseluta)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/paste-php-code-in-themes-file/)
 * Hi, I love your depicter plug-in and wish to use it on my website but I have 
   2 main problems:
 * 1. “Paste the PHP code into your theme’s file” right below the Publish button.
   In what theme file I should paste this code? I don’t know! What specific file?
   index.php, functions.php, header.php?
 * 2. I cannot seem to publish any slider due to an error: Document does not exist.
   Slider is not published yet and saved as “draft”
 * Whenever I click Publish and hit refresh the slider is again Unpublished.
 * Some server info: Centos 6.10, PHP 7.3.25, nginx/1.19.5

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

 *  Plugin Author [averta](https://wordpress.org/support/users/averta/)
 * (@averta)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/paste-php-code-in-themes-file/#post-16062249)
 * [@panseluta](https://wordpress.org/support/users/panseluta/)
    We are glad you
   like Depicter. 1. we do not recommend you use this method since you are not familiar
   with this, so it is better for you to use a shortcode or even better use a page
   builder and use Depicter element for that page builder such as Elementor, Gutenberg
   and etc.
 * 2. Please make sure you are using the laters version of Depicter, if so I think
   one of the image you are using has some problems. please try to remove the images
   one by one to see which one got the issue.
 * let me know
 *  Thread Starter [panseluta](https://wordpress.org/support/users/panseluta/)
 * (@panseluta)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/paste-php-code-in-themes-file/#post-16062552)
 * Hi and thank you for answering. I figured out both problems.
 * 1. I put PHP code in header.php using a text editor and everythinkg works great
   now.
 * 2. I forgot to chown the website directory recursively. So under linux command
   line I did `chown -R nginx:nginx /path/to/website/folder` without “/” at the 
   end of folder name.
 * Thanks. Keep up the good work with this beautiful plugin 😉
 *  Plugin Author [averta](https://wordpress.org/support/users/averta/)
 * (@averta)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/paste-php-code-in-themes-file/#post-16063732)
 * We are glad you like Depicter and yes for sure we are going to make it better
   and better

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

The topic ‘Paste php code in theme’s file’ is closed to new replies.

 * ![](https://ps.w.org/depicter/assets/icon-128x128.gif?rev=3304240)
 * [Depicter — Popup & Slider Builder](https://wordpress.org/plugins/depicter/)
 * [Support Threads](https://wordpress.org/support/plugin/depicter/)
 * [Active Topics](https://wordpress.org/support/plugin/depicter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/depicter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/depicter/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [averta](https://wordpress.org/support/users/averta/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/paste-php-code-in-themes-file/#post-16063732)
 * Status: resolved