[Resolved] install yoast breadcrumbs

Home Forums Support [Resolved] install yoast breadcrumbs

Home Forums Support install yoast breadcrumbs

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #720597
    CRISTO

    This is a pretty basic question, but I want to add yoast breadcrumbs. Here is the code they gave me:
    <?php
    if ( function_exists(‘yoast_breadcrumb’) ) {
    yoast_breadcrumb( ‘<p id=”breadcrumbs”>’,'</p>’ );
    }
    ?>

    Can I just add this using custom css?

    #720604
    David
    Staff
    Customer Support

    Hi there,

    you can add the code to a Hook Element:

    https://docs.generatepress.com/article/hooks-element-overview/

    Make sure you check execute PHP in the Hook.

    You can see what Hook to use on this visual guide:

    https://docs.generatepress.com/article/hooks-visual-guide/

    #720608
    CRISTO

    Thanks, I have never used hooks before….and I saw this note on GP website: GP Hooks has been replaced by our Elements module.
    so not sure where to go from here.

    #720615
    David
    Staff
    Customer Support

    The link above explains. But… simply:

    1. Go to Appearance > GeneratePress and ensure the Elements module is active.
    2. Appearance > Elements > New Element > Hook.
    3. Give the hook a title, add the code you have to the Content.
    4. Select Hook: before_content
    5. Check Execute PHP
    6. Display Rules > Set Display Rule > Entire Site

    You can change the position it displays by changing the Hook (point 4) to any of those listed in the visual guide above.

    #720621
    CRISTO

    Thanks…I am almost there except at step 5 it says: Unable to execute PHP as DISALLOW_FILE_EDIT is defined.

    #720661
    David
    Staff
    Customer Support

    OK, thats a server configuration, that would need you to follow the steps here:

    https://codex.wordpress.org/Hardening_WordPress#Disable_File_Editing

    If you’re not comfortable with that then instead of adding the PHP snippet add the short code that is given here:

    https://kb.yoast.com/kb/implement-wordpress-seo-breadcrumbs/

    And instead of checking execute PHP, check Execute shortcode

    #720711
    CRISTO

    Thanks, David. I took your advice and used the shortcode. It worked…finally understand what breadcrumbs are supposed to look like. Thanks for all your help.

    #720987
    David
    Staff
    Customer Support

    You’re welcome glad to be of help

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.