• HI Anders,
    in the template-tags.php file, section breadcrumbs you write (l 988):

    // Make the markup of the breadcrumbs list items filterable.
    // Child themes and plugins can set the list items with their own logic here!
    echo apply_filters( ‘chaplin_breadcrumbs_list_items_markup’, ob_get_clean(), $args );

    I want to remove the link to CPT archive template but display the CPT slug (ligne 955 et 956). Can you give me a advise, filter how ?
    best regards,

    Monica

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Anders Norén

    (@anlino)

    Hi @m0nique,

    That filter allows you to modify the HTML markup of the breadcrumbs before they are output. You can find more information about how to use filters here: https://developer.www.ads-software.com/plugins/hooks/filters/

    In this case, the hook name is chaplin_breadcrumbs_list_items_markup. You should add your callback function to a child theme, so it doesn’t get overwritten when Chaplin is updated. When you have the callback function up and running (you can use the example function in the linked article as a starting point), you can use preg_replace() to replace the CPT archive link with just the CPT label.

    — Anders

    Thread Starter m0nique

    (@m0nique)

    Hi Anders,

    you advise me to use the preg_replace() function in the filter, OK but i don’t understand how target the breadcrumb content: subject

    “Searches subject for matches to pattern and replaces them with replacement“.
    Can you help me ?
    Monica

    Thread Starter m0nique

    (@m0nique)

    ok I have to use $buffer,
    but it’s still very difficult for me to filter the breadcrumb…as a beginner…I close this post.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘template-tags override breadcrumbs’ is closed to new replies.