• 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

    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 to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • For me it look like you should make the changes in your child themes “single.php”

    Thread Starter vadiko

    (@vadiko)

    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

    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

    (@vadiko)

    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
    And I did as I wanted)
    Screen shot https://prnt.sc/pdr8kf
    The code is test, now I just tested it. Then change to the desired code

    Thread Starter vadiko

    (@vadiko)

    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
    Thanks

    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

    (@vadiko)

    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 5 years, 1 month ago by vadiko.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Add PHP code to the post page’ is closed to new replies.