Title: Add PHP code to the post page
Last modified: October 1, 2019

---

# Add PHP code to the post page

 *  [vadiko](https://wordpress.org/support/users/vadiko/)
 * (@vadiko)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/add-php-code-to-the-post-page/)
 * Hello.
 * please tell me
 * I have created a child theme and make all the changes in the child theme.
 * I need to add some of my codes on the post page
 * 1.Before section category and tag
    2.After section category and tag 3.In front
   of the navigation block 4.After the navigation block Screen shot [https://prnt.sc/pdf57n](https://prnt.sc/pdf57n)
 * Please tell me where it is right, in which file and after which line should I
   enter my PHP codes and not break the record template.
 * Thank.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fadd-php-code-to-the-post-page%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Michael “A3” Jensen](https://wordpress.org/support/users/poomik/)
 * (@poomik)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/add-php-code-to-the-post-page/#post-11988337)
 * For me it look like you should make the changes in your child themes “single.
   php”
 *  Thread Starter [vadiko](https://wordpress.org/support/users/vadiko/)
 * (@vadiko)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/add-php-code-to-the-post-page/#post-11988783)
 * Thanks for the quick response.
 * If it does not bother you, please tell me.
 * I am not an experienced user and I don’t know after which lines to insert my 
   codes and not break the “single.php” template
 * Sorry for my English.
    Translate the Google translator
 * Thanks
 *  [Michael “A3” Jensen](https://wordpress.org/support/users/poomik/)
 * (@poomik)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/add-php-code-to-the-post-page/#post-11988859)
 * I can’t answer that unless I know what you want to achieve.
    Are you sure it 
   is not a matter of widgets and CSS.
 * And limiting individual widget visibility to posts only ??
 *  Thread Starter [vadiko](https://wordpress.org/support/users/vadiko/)
 * (@vadiko)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/add-php-code-to-the-post-page/#post-11988990)
 * I only need to output code on single entries
 * Thanks 3 and 4 point turned out)
    I added my code to “single.php” 3 point after
   line 16 4 point after line 23 Screen shot [https://prnt.sc/pdrebu](https://prnt.sc/pdrebu)
   And I did as I wanted) Screen shot [https://prnt.sc/pdr8kf](https://prnt.sc/pdr8kf)
   The code is test, now I just tested it. Then change to the desired code
 *  Thread Starter [vadiko](https://wordpress.org/support/users/vadiko/)
 * (@vadiko)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/add-php-code-to-the-post-page/#post-11989018)
 * But where and in which file to insert the code to display
    1. Before the category
   and tag section 2. After the category and tag section Screen sho [https://prnt.sc/pdrn62](https://prnt.sc/pdrn62)
   Thanks
 *  [Michael “A3” Jensen](https://wordpress.org/support/users/poomik/)
 * (@poomik)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/add-php-code-to-the-post-page/#post-11989026)
 * About breaking the theme. Then it is always possible via FTP to remove what you
   have added in the individual files.
    Of course, a backup can be a good idea too
   😉 But a few “pen strokes” via FTP can save you a lot of time, even when things
   go wrong 😀
 *  Thread Starter [vadiko](https://wordpress.org/support/users/vadiko/)
 * (@vadiko)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/add-php-code-to-the-post-page/#post-11989068)
 * Thanks for the tip
    But this site is for tests. I’m doing plugin tests and themes
   on this site I create a child theme using the Child Theme Configurator plugin
   There you can quickly delete or add template files
    -  This reply was modified 6 years, 6 months ago by [vadiko](https://wordpress.org/support/users/vadiko/).

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

The topic ‘Add PHP code to the post page’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/iconic-one/3.3/screenshot.png)
 * Iconic One
 * [Support Threads](https://wordpress.org/support/theme/iconic-one/)
 * [Active Topics](https://wordpress.org/support/theme/iconic-one/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/iconic-one/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/iconic-one/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [vadiko](https://wordpress.org/support/users/vadiko/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/add-php-code-to-the-post-page/#post-11989068)
 * Status: not resolved