Breadcrumbs in SEO Yoast plugin

Adding Yoast SEO breadcrumbs in WordPress.

Just add the below PHP code where you want to show breadcrumbs on your page.


<?php
if ( function_exists('yoast_breadcrumb') ) {
  yoast_breadcrumb( '<p id="breadcrumbs">','</p>' );
}
?>

You can use shortcode instead of PHP code.


[wpseo_breadcrumb]

Changing google reCAPTCHA language in contact form 7 – WordPress

There is a function to change the language in google reCAPTCHA. Just add the below code in functions.php and change the language code. See the list of supported language codes here.


add_action( 'wpcf7_enqueue_scripts', 'custom_recaptcha_enqueue_scripts', 11 );
function custom_recaptcha_enqueue_scripts() {
	wp_deregister_script( 'google-recaptcha' );
	$url = 'https://www.google.com/recaptcha/api.js';
	$url = add_query_arg( array(
		'onload' => 'recaptchaCallback',
		'render' => 'explicit',
	 	'hl' => 'fr-CA' ), $url );

	wp_register_script( 'google-recaptcha', $url, array(), '2.0', true );
}