Title: Adding breadcrumb function code
Last modified: August 17, 2024

---

# Adding breadcrumb function code

 *  Resolved [mikeyamon](https://wordpress.org/support/users/mikeyamon/)
 * (@mikeyamon)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/adding-breadcrumb-function-code/)
 * Hello, I’m a rank Math SEO user and I wish to activate Rank Math’s Breadcrumb
   on my website. Is it possible to add Rank Math’s Breadcrumb function code using
   WPCode?

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

 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/adding-breadcrumb-function-code/#post-17961265)
 * Hi [@mikeyamon](https://wordpress.org/support/users/mikeyamon/),
 * Yes, you can use WPCode to add the Rank Math breadcrumbs either using the PHP
   function using a PHP snippet in WPCode or using the shortcode in a Text snippet
   from WPCode.
 * You can then choose auto-insert locations to place the output of the snippet 
   on your website.
 * If you need help getting started with WPCode snippets please take a look at this
   article: [https://wpcode.com/docs/how-to-create-your-first-snippet/](https://wpcode.com/docs/how-to-create-your-first-snippet/)
 *  Thread Starter [mikeyamon](https://wordpress.org/support/users/mikeyamon/)
 * (@mikeyamon)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/adding-breadcrumb-function-code/#post-17961305)
 * Hello [@gripgrip](https://wordpress.org/support/users/gripgrip/) and thank you
   for your response. On the instertions>location, what should I select here? Should
   I select instert after content? I want Rank Math’s breadcrumb to displayed in
   the exact area where the original theme’s breadcrumb was displayed which was 
   before the post.
    -  This reply was modified 1 year, 9 months ago by [mikeyamon](https://wordpress.org/support/users/mikeyamon/).
    -  This reply was modified 1 year, 9 months ago by [mikeyamon](https://wordpress.org/support/users/mikeyamon/).
    -  This reply was modified 1 year, 9 months ago by [mikeyamon](https://wordpress.org/support/users/mikeyamon/).
 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/adding-breadcrumb-function-code/#post-17961447)
 * Hi [@mikeyamon](https://wordpress.org/support/users/mikeyamon/),
 * You can try using the “Insert Before Post” location. Your theme is probably using
   a different location since the theme contains the actual template so you might
   not be able to replicate the location 100% with the auto-insert options available
   in the lite plugin.
 *  Thread Starter [mikeyamon](https://wordpress.org/support/users/mikeyamon/)
 * (@mikeyamon)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/adding-breadcrumb-function-code/#post-17961953)
 * Thank you for the support. Let me give it a try. If I had the Pro version of 
   this plugin, would I be able to display Rank Math’s breadcrumb in the original
   location?
    -  This reply was modified 1 year, 9 months ago by [mikeyamon](https://wordpress.org/support/users/mikeyamon/).
    -  This reply was modified 1 year, 9 months ago by [mikeyamon](https://wordpress.org/support/users/mikeyamon/).
 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/adding-breadcrumb-function-code/#post-17962195)
 * Hi [@mikeyamon](https://wordpress.org/support/users/mikeyamon/),
 * Yes, in the premium version we have “Insert Anywhere” locations where you can
   use a CSS Selector to choose where a snippet is inserted without having to make
   changes to a template file.
 * If you would like to learn more about that please reach out using the form here:
   [https://wpcode.com/contact/](https://wpcode.com/contact/)
 *  Thread Starter [mikeyamon](https://wordpress.org/support/users/mikeyamon/)
 * (@mikeyamon)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/adding-breadcrumb-function-code/#post-17966622)
 * Thank you very much [@gripgrip](https://wordpress.org/support/users/gripgrip/)
   for the explanation. What if I decide to add Rank Math’s function code on the
   Header Snippet just like how their **[documentation](https://rankmath.com/kb/breadcrumbs/)**
   suggest on section 3.1. If I do that, will the code work?
 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/adding-breadcrumb-function-code/#post-17966660)
 * Hi [@mikeyamon](https://wordpress.org/support/users/mikeyamon/),
 * Yes, you can use that code in PHP snippet in WPCode but it’s still a matter of
   where the snippet is inserted. The article suggest editing your theme files, 
   with WPCode you should be able to avoid that by using the “Insert Before Post”
   location, for example.
 *  Thread Starter [mikeyamon](https://wordpress.org/support/users/mikeyamon/)
 * (@mikeyamon)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/adding-breadcrumb-function-code/#post-17968373)
 * Thanks [@gripgrip](https://wordpress.org/support/users/gripgrip/) for the explanation.
   I will put the code on the header field. But on the header field I also have 
   Google Analytics code. Which code do you suggest should go first; should Rank
   Math’s code go first or Google Analytics code?
 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/adding-breadcrumb-function-code/#post-17968593)
 * Hi [@mikeyamon](https://wordpress.org/support/users/mikeyamon/),
 * I don’t recommend putting the code in the header field as that is being output
   in the page <head> area which should only be used for scripts.
 * That’s why I suggested using the “Insert Before Content” location in a snippet.
 *  Thread Starter [mikeyamon](https://wordpress.org/support/users/mikeyamon/)
 * (@mikeyamon)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/adding-breadcrumb-function-code/#post-17968627)
 * Understood! I only have one concern regarding the suggestion that you gave me.
   If I put Rank Math’s code using the “Insert Before Content” location in a snippet;
   will the breadcrumb also appear on 404 error page and taxonomy?
 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/adding-breadcrumb-function-code/page/2/#post-17968653)
 * Hi [@mikeyamon](https://wordpress.org/support/users/mikeyamon/),
 * You can easily add a new conditional logic rule in WPCode to limit loading the
   snippet only on single posts.
 * Enable conditional logic and choose Post Type for the type of rule from the “
   Where” category: [https://a.supportally.com/i/eRbjHE](https://a.supportally.com/i/eRbjHE)
 * Adding the code to the Header will definitely load it on all pages.
 *  Thread Starter [mikeyamon](https://wordpress.org/support/users/mikeyamon/)
 * (@mikeyamon)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/adding-breadcrumb-function-code/page/2/#post-17968663)
 * Thank you very much for the excellent support. I have rated the plugin 5/5.
 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/adding-breadcrumb-function-code/page/2/#post-17970955)
 * Thank you [@mikeyamon](https://wordpress.org/support/users/mikeyamon/) 🙂

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

The topic ‘Adding breadcrumb function code’ is closed to new replies.

 * ![](https://ps.w.org/insert-headers-and-footers/assets/icon-256x256.png?rev=2758516)
 * [WPCode - Insert Headers and Footers + Custom Code Snippets - WordPress Code Manager](https://wordpress.org/plugins/insert-headers-and-footers/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-headers-and-footers/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-headers-and-footers/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-headers-and-footers/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-headers-and-footers/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-headers-and-footers/reviews/)

 * 19 replies
 * 2 participants
 * Last reply from: [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * Last activity: [1 year, 9 months ago](https://wordpress.org/support/topic/adding-breadcrumb-function-code/page/2/#post-17970955)
 * Status: resolved