THEMEHALL
  • Omega
  • Cart
  • Support
  • My Account

Adding Yoast Breadcrumbs to Church theme?

Home › Forums › Omega Child › Adding Yoast Breadcrumbs to Church theme?

Tagged: breadcrumbs, church theme

  • This topic has 4 replies, 2 voices, and was last updated 10 years, 12 months ago by webblish.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • February 13, 2015 at 1:35 pm #3021
    webblish
    Participant

    Hi, I’m using a modified Church theme on one of my websites. I’ve sorted out most things, but can’t figure out how/where to add the code for the breadcrumbs for the Yoast SEO plugin. I would like to have it just above the entry header. Here’s the code:

    <?php if ( function_exists('yoast_breadcrumb') ) {
    yoast_breadcrumb('<p id="breadcrumbs">','</p>');
    } ?>
    February 15, 2015 at 12:19 pm #3026
    han
    Keymaster

    First you need to install this plugin, https://wordpress.org/plugins/code-snippets/

    Then add new Snippet and drop below code into code textarea

    add_action( 'omega_before_main', 'church_breadcrumb' );
    
    function church_breadcrumb() {
      if ( function_exists('yoast_breadcrumb') && !is_front_page() ) {
        yoast_breadcrumb('<p id="breadcrumbs">','</p>');
      } 
    }
    
    February 16, 2015 at 9:00 am #3027
    webblish
    Participant

    Many thanks! It seams to work fine but the breadcrumbs do not show on the homepage. Is that correct? Is that because I’m using the Home banner widget?

    February 17, 2015 at 10:30 am #3029
    han
    Keymaster

    Use this snippet if you want to display on all pages including homepage

    add_action( 'omega_before_main', 'church_breadcrumb' );
    
    function church_breadcrumb() {
      if ( function_exists('yoast_breadcrumb') ) {
        yoast_breadcrumb('<p id="breadcrumbs">','</p>');
      } 
    }
    February 17, 2015 at 12:38 pm #3030
    webblish
    Participant

    Great, many thanks for your support!

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)

You must login to reply to this topic.

Copyright © 2025 THEMEHALL.

  • Terms of Service
  • Resources
  • Blog
  • Support
css.php