Breadcrumb structured data testing tool Error- how to fix?
Topics related to RedWaves lite theme goes here.

tuba

Member Rank
Posts: 35
Joined: Tue Jun 20, 2017 8:39 am
Display Name: tuba

Breadcrumb structured data testing tool Error- how to fix?

linkPost by tuba » Sat Feb 10, 2018 12:51 pm

hi Asmi
I would like to use breadcrumb but not structured data testing tool error
How can I fix :roll:

Thank you :)
Attachments
error.png
error.png (121.45 KiB) Viewed 1256 times
momename

VIP Member Rank
Posts: 14
Joined: Fri Aug 28, 2015 9:04 am

Re: Breadcrumb structured data testing tool Error- how to fix?

linkPost by momename » Sun Feb 11, 2018 3:27 pm

I have problems like you, also wait admin help me.
User avatar
Asmi Khalil

Site Admin Rank
Posts: 781
Joined: Fri Jun 26, 2015 7:13 am
Display Name: Asmi Khalil
Location: Tunisia

Re: Breadcrumb structured data testing tool Error- how to fix?

linkPost by admin » Fri Feb 23, 2018 2:25 am

Sorry guys for the very late reply :oops:
The RDF vocabulary is no longer maintained and no longer supported by Google. I will be fixing this in the next update but until then, here is a temporary fix;
Open /template-parts/content-single.php and change this line;
<div class="breadcrumb" xmlns:v="http://rdf.data-vocabulary.org/#"><?php redwaves_breadcrumb(); ?></div>
To this line;
<?php redwaves_breadcrumb(); ?>
Now open functions.php and replace the redwaves_breadcrumb function (starting from line 245);
/*-----------------------------------------------------------------------------------*/
/*  Breadcrumbs
/*-----------------------------------------------------------------------------------*/
if (!function_exists('redwaves_breadcrumb')) {
	function redwaves_breadcrumb() {

			.............
		}
	}
}
With this code;
/*-----------------------------------------------------------------------------------*/
/*  Breadcrumbs
/*-----------------------------------------------------------------------------------*/
if ( !function_exists( 'redwaves_breadcrumb') ) {
	function redwaves_breadcrumb() { ?>

		<div class="breadcrumbs">
			<ol itemscope itemtype="http://schema.org/BreadcrumbList">

				<li><i class="fa fa-home"></i></li>

				<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">

					<a itemprop="item" href="<?php esc_url( home_url( '/' ) ); ?>">
						<span itemprop="name"><?php esc_html_e( 'Home', 'redwaves-lite' ); ?></span>
					</a>
					<meta itemprop="position" content="1" />
				</li>

				<?php if ( is_single() ) {

					$categories = get_the_category();

					if ( !empty( $categories ) ) { ?>
						<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">

							<?php _e( '<i class="fa fa-caret-right"></i>', 'redwaves-lite' ); ?>
							<a itemprop="item" href="<?php echo get_category_link( $categories[0]->term_id ); ?>">
								<span itemprop="name"><?php echo $categories[0]->cat_name; ?></span>
							</a>
							<meta itemprop="position" content="2" />
						</li>
					<?php } ?>

					<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">

						<?php _e( '<i class="fa fa-caret-right"></i>', 'redwaves-lite' ); ?>
						<a itemprop="item" href="<?php the_permalink(); ?>">
							<span itemprop="name"><?php the_title(); ?></span>
						</a>
						<meta itemprop="position" content="2" />
					</li>

				<?php } ?>
			</ol>
		</div>

	<?php }
}
Now add this CSS code for styling;
.breadcrumbs ol {
    padding: 0;
}
.breadcrumbs li {
    display: inline;
    list-style-type: none;
    margin-right: 4px;
}
.breadcrumbs li:first-child {
    margin-right: 0;
}
I think there is a world market for maybe five computers. - IBM chairman Thomas Watson, 1943
User avatar
Asmi Khalil

Site Admin Rank
Posts: 781
Joined: Fri Jun 26, 2015 7:13 am
Display Name: Asmi Khalil
Location: Tunisia

Re: Breadcrumb structured data testing tool Error- how to fix?

linkPost by admin » Fri Feb 23, 2018 2:28 am

momename wrote:I have problems like you, also wait admin help me.
Hi momename,
This this fix will work for RedWaves lite but you can make few edits to import it to RedWaves. If you need help please create a new topic in RedWaves section and I will give you a code that works on RedWaves.
Of course this issue will be fixed in next RedWaves update too and all the other themes that use the RDF vocabulary.
I think there is a world market for maybe five computers. - IBM chairman Thomas Watson, 1943
tuba

Member Rank
Posts: 35
Joined: Tue Jun 20, 2017 8:39 am
Display Name: tuba

Re: Breadcrumb structured data testing tool Error- how to fix?

linkPost by tuba » Sat Feb 24, 2018 10:28 pm

ok Thank you Asmi. :)
User avatar
Asmi Khalil

Site Admin Rank
Posts: 781
Joined: Fri Jun 26, 2015 7:13 am
Display Name: Asmi Khalil
Location: Tunisia

Re: Breadcrumb structured data testing tool Error- how to fix?

linkPost by admin » Mon Mar 26, 2018 5:19 pm

tuba wrote:
Sat Feb 24, 2018 10:28 pm
ok Thank you Asmi. :)
Most welcome :D
I think there is a world market for maybe five computers. - IBM chairman Thomas Watson, 1943

Who is online

Users browsing this forum: No registered users and 1 guest

It is currently Tue Apr 23, 2019 10:12 am