Hook between header(s) and page content

Home Forums Jevelin Theme Hook between header(s) and page content

Home Forums Jevelin Theme Hook between header(s) and page content

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    RESOLVED Posts
  • Hi,

     

    I’m currently trying to add Yoast SEO breadcrumbs to my site. I’m trying to add them to my child theme through the functions.php file. This code works:

    /* Add Yoast SEO breadcrumbs */
    add_action( 'loop_start', 'wordpress_seo_plugins_breadcrumbs' );
    function wordpress_seo_plugins_breadcrumbs() {
      if ( function_exists('yoast_breadcrumb') ) { 
        yoast_breadcrumb('<p id="breadcrumbs">','</p>'); 
      }
    }

    This successfully adds the breadcrumb, but in very strange spots, depending on the page. It’ll add it twice on the WooCommerce store page, and is hidden under blog lists.

     

    It adds the breadcrumb inside div#content > div.(whatever the page type is) as the first element. Ideally,  I’d like the breadcrumb to be the first element in div.container.entry-content. Really, right between the header and the content is where I want it.

     

    Is there a hook-map for the Jevelin theme, or does it follow another theme’s map? In this link for the Genesis hook map, I’d like my breadcrumbs to be added in genesis_before_content.

     

    Any help is appreciated.

     

    Thanks,

    Billy

    Solution for this topic

    Hi Billy,

     

    I hope you are well today and thank you for your question.

     

    There isn’t any hook for that position but you can add that code in that position by editing the header.php file in the child theme of Jevelin theme.

     

    I did it in my child theme and attached it to this reply so please refer it.

     

    Best regards,
    Shufflehound team

    Attachments:
    You must be logged in to view attached files.

    Hi,

     

    Thanks for your reply. I was hoping I wouldn’t need to resort to copying the header.php in case of theme updates, but that solution works perfectly.

     

    Thanks!

    Billy

    You are most welcome here 🙂

Viewing 4 posts - 1 through 4 (of 4 total)