Title: Adding PHP code to Header template
Last modified: August 20, 2016

---

# Adding PHP code to Header template

 *  [wrightj999](https://wordpress.org/support/users/wrightj999/)
 * (@wrightj999)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/adding-php-code-to-header-template/)
 * Hello,
 * I am adding php code to the header:
 *     ```
       <?php if ( function_exists('yoast_breadcrumb') ) {
       	yoast_breadcrumb('<p id="breadcrumbs">','</p>');
       } ?>
       ```
   
 * _[Please post code snippets between backticks or use the code button.]_
 * This is a code from Yoast, that is supposed to uploaded to the Template file 
   of the theme that has the Yoast SEO plugin installed. It makes breadcrumbs that
   appear in google when your site appears in the search results.
 * I added the code to the Header template file like so:
    (the code from above will
   be on the bottom of this run of code.
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome#Posting_Code).
   Please use the [pastebin](http://wordpress.pastebin.com/)]_
 * Is this the correct place to put this code?

The topic ‘Adding PHP code to Header template’ is closed to new replies.

## Tags

 * [customization](https://wordpress.org/support/topic-tag/customization/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [template](https://wordpress.org/support/topic-tag/template/)

 * 0 replies
 * 1 participant
 * Last reply from: [wrightj999](https://wordpress.org/support/users/wrightj999/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/adding-php-code-to-header-template/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
