• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Change BreadCrumb Schema Info

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Change BreadCrumb Schema Info

This topic is: not resolved

Tagged: breadcrumb, schema

  • This topic has 2 replies, 2 voices, and was last updated 8 years, 7 months ago by gera3d.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • May 12, 2017 at 4:05 pm #206358
    gera3d
    Member

    Hi everyone trying to deal with this issue maybe this group can help. I am trying to change some Schema info built into the theme.

    <a href="http://aoms:8888/procedure/" itemprop="item">
    <span itemprop="name">Procedures</span>
    </a>

    I want to change itemprop="item" to itemprop="url"

    I am looking at this filter but it does not seem to change the itemprop

    
    add_filter('genesis_breadcrumb_link', 'change_breadcrumbs_link');
    function change_breadcrumbs_link( $link ) {
    
    }

    Here is the code I need to rewrite but I am not sure how to get the filter to work right. Your insight would be greatly appreciated.

    	/**
    	 * Return anchor link for a single crumb.
    	 *
    	 * @since 1.5.0
    	 *
    	 * @param string      $url     URL for href attribute.
    	 * @param string      $title   Title attribute.
    	 * @param string      $content Linked content.
    	 * @param bool|string $sep     Optional. Separator. Default is empty string.
    	 *
    	 * @return string HTML markup for anchor link and optional separator.
    	 */
    	protected function get_breadcrumb_link( $url, $title, $content, $sep = '' ) {
    
    		// Empty title, for backward compatibility.
    		$title = '';
    
    		$itemprop_item = genesis_html5() ? ' itemprop="item"' : '';
    		$itemprop_name = genesis_html5() ? ' itemprop="name"' : '';
    
    		$link = sprintf( '<a href="%s"%s><span%s>%s</span></a>', esc_attr( $url ), $itemprop_item, $itemprop_name, $content );
    
    		/**
    		 * Filter the anchor link for a single breadcrumb.
    		 *
    		 * @since 1.5.0
    		 *
    		 * @param string $link    HTML markup for anchor link, before optional separator is added.
    		 * @param string $url     URL for href attribute.
    		 * @param string $title   Title attribute.
    		 * @param string $content Link content.
    		 * @param array  $args    Arguments used to generate the breadcrumbs. Documented in Genesis_Breadcrumbs::get_output().
    		 */
    		$link = apply_filters( 'genesis_breadcrumb_link', $link, $url, $title, $content, $this->args );
    
    		if ( genesis_html5() ) {
    			$link = sprintf( '<span %s>', genesis_attr( 'breadcrumb-link-wrap' ) ) . $link . '</span>';
    		}
    
    		if ( $sep ) {
    			$link .= $sep;
    		}
    
    		return $link;
    
    	}
    http://aomsgen.staging.wpengine.com/procedure/dental-implants-amarillo-tx/
    May 13, 2017 at 6:25 am #206376
    Victor Font
    Moderator

    Try this:

    add_filter('genesis_breadcrumb_link', 'change_breadcrumbs_link');
    function change_breadcrumbs_link( $link ) {
        return str_replace ( 'itemprop="item"' , 'itemprop="url"' , $link );
    }

    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    May 15, 2017 at 11:36 am #206479
    gera3d
    Member

    This is just what I am looking for. You are the man thanks.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble