Title: How do I add breadcrumbs function inside header class?
Last modified: August 15, 2020

---

# How do I add breadcrumbs function inside header class?

 *  [sanuja](https://wordpress.org/support/users/sanujacom/)
 * (@sanujacom)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/how-do-i-add-breadcrumbs-function-inside-header-class/)
 * I would like to add breadcrumbs only on the Pages (not posts) on my website. 
   The SEO plugin, Rank Math comes with breadcrumbs. It is working but I cannot 
   get the breadcrumbs to show up at the exact location I would like to have it.
   I want the breadcrumbs to appear just above the Page title (at the same exact
   place where Categories appear on the Posts). Pages do not have categories and
   I want to use that area for breadcrumbs.
 * After spending some time looking at all the files, I found the header/title text
   area in _content-page.php_. Original PHP code:
 *     ```
       <?php
       		// Page thumbnail and title.
       		twentyfourteen_post_thumbnail();
       		the_title( '<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->' );
       	?>
       ```
   
 * I marked the place where I would like to breadcrumbs to show up as _[breadcrumb\
   _should\_go\_here]_ in the following code.
 *     ```
       	<?php
       		// Page thumbnail and title.
       		twentyfourteen_post_thumbnail();
       		the_title( '<header class="entry-header">[breadcrumb_should_go_here]
       <h1 class="entry-title">', '</h1></header><!-- .entry-header -->' );
       	?>
       ```
   
 * This should ideally generate the breadcrumbs just above the Page title. But when
   I replace `[breadcrumb_should_go_here]` with the following, I get a PHP error.
 *     ```
       	<div class="entry-meta">
       			<span class="cat-links"><?php if (function_exists('breadcrumbs')) breadcrumbs(); ?></span>
       		</div>
       ```
   
 * Note I am trying to use the default category CSS. May be a php expert here can
   advice me on how to add the breadcrumbs php function within the header function.
 * Thank you for your advice.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fhow-do-i-add-breadcrumbs-function-inside-header-class%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

The topic ‘How do I add breadcrumbs function inside header class?’ is closed to 
new replies.

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

## Tags

 * [page](https://wordpress.org/support/topic-tag/page/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [PHP7](https://wordpress.org/support/topic-tag/php7/)

 * 0 replies
 * 1 participant
 * Last reply from: [sanuja](https://wordpress.org/support/users/sanujacom/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/how-do-i-add-breadcrumbs-function-inside-header-class/)
 * Status: not resolved