Title: Php code in template file returs error
Last modified: May 8, 2020

---

# Php code in template file returs error

 *  [FeliceAntonio](https://wordpress.org/support/users/antonio_09/)
 * (@antonio_09)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-code-in-template-file-returs-error/)
 * Hello to every one,
    when I insert PHP code in the template file, returns an 
   error. I wonder why, do you have some ideas about? Thanks.

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

 *  [stilman davis](https://wordpress.org/support/users/stilman-davis/)
 * (@stilman-davis)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-code-in-template-file-returs-error/#post-12804884)
 * To get help, you need to tell about the error message and what the code is you
   are trying to insert for what reason.
 * I would recommend you work in a Child Theme. It makes it very easy to make changes
   and recover the site if you make a horrible mistake.
 *  Thread Starter [FeliceAntonio](https://wordpress.org/support/users/antonio_09/)
 * (@antonio_09)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-code-in-template-file-returs-error/#post-12804960)
 * I’m working on file in the child theme.
    In header.php into the child theme, 
   I add the breadcrumb code at the end of the page, on line 367:
 *     ```
       </header><!-- #site-header -->
   
       <?php
       if ( function_exists('yoast_breadcrumb') ) {
         yoast_breadcrumb( '<p id="breadcrumbs">','</p>' );
       }
       ?>
       ```
   
 * and return the error on line 184:
 * `Parse error: syntax error, unexpected ';' in /home/aproposi/public_html/wp-content/
   themes/twentytwenty-child/header.php on line 184`
    -  This reply was modified 6 years, 1 month ago by [FeliceAntonio](https://wordpress.org/support/users/antonio_09/).
 *  [stilman davis](https://wordpress.org/support/users/stilman-davis/)
 * (@stilman-davis)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-code-in-template-file-returs-error/#post-12806070)
 * It is good that you are working in a child theme. What happens if you remove 
   that code? Do you still get the error? Does the parent theme work correctly?
 * I looked at the header.php in the theme and don’t see why you are getting the
   error on that particular line. It may be that you have made other changes to 
   the file and the combination of changes has made the error arise.
 * I am afraid that I don’t have the knowledge to find the error. I was hoping that
   you hadn’t changed the theme’s files and you can get the original theme to work
   as expected. I hope that someone with more expertise will be able to help you
   now.
 *  Thread Starter [FeliceAntonio](https://wordpress.org/support/users/antonio_09/)
 * (@antonio_09)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-code-in-template-file-returs-error/#post-12810347)
 * However, thanks for your time -:)
    -  This reply was modified 6 years, 1 month ago by [FeliceAntonio](https://wordpress.org/support/users/antonio_09/).
 *  [stilman davis](https://wordpress.org/support/users/stilman-davis/)
 * (@stilman-davis)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-code-in-template-file-returs-error/#post-12810435)
 * Someone else may take up the challenge. I am sorry I cannot help you immediately.
 *  Thread Starter [FeliceAntonio](https://wordpress.org/support/users/antonio_09/)
 * (@antonio_09)
 * [6 years ago](https://wordpress.org/support/topic/php-code-in-template-file-returs-error/#post-12839220)
 * Sorry,
    **I ask to a moderator** if is possible to corrige t[his post](https://wordpress.org/support/topic/php-code-in-template-file-returs-error/#post-12804960),
   I wrong to add all the code, I would ask you to delete all the string before `
   wp-content/themes/twentytwenty-child/header.php on line 184` Thanks.
    -  This reply was modified 6 years ago by [FeliceAntonio](https://wordpress.org/support/users/antonio_09/).
 *  Thread Starter [FeliceAntonio](https://wordpress.org/support/users/antonio_09/)
 * (@antonio_09)
 * [6 years ago](https://wordpress.org/support/topic/php-code-in-template-file-returs-error/#post-12839368)
 * However, for the breadcrumb, I added [this code](https://kinsta.com/knowledgebase/add-code-wordpress-header-footer/#manual)
   in functions.php child theme, and into it the breadcrumb code.
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [6 years ago](https://wordpress.org/support/topic/php-code-in-template-file-returs-error/#post-12870921)
 * Sorry, why was this topic tagged with `modlook`?
 *  Thread Starter [FeliceAntonio](https://wordpress.org/support/users/antonio_09/)
 * (@antonio_09)
 * [6 years ago](https://wordpress.org/support/topic/php-code-in-template-file-returs-error/#post-12871195)
 * I wonder why.

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

The topic ‘Php code in template file returs error’ is closed to new replies.

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

 * 9 replies
 * 3 participants
 * Last reply from: [FeliceAntonio](https://wordpress.org/support/users/antonio_09/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/php-code-in-template-file-returs-error/#post-12871195)
 * Status: not resolved