jobrelay_wpcon_google_indexing_mode hook

In this article

apply_filters( 'jobrelay_wpcon_google_indexing_mode', $mode string )

Allows filtering of the Google Indexing mode the plugin uses. By default this is the Google Indexing setting, except that it is off when Output Google for Jobs markup is not ticked, and log when the site address has changed since the setting was turned on.

Parameters

  • $mode (string) Either off, log or live.

Example

// never call google on a site whose address contains staging.
add_filter( 'jobrelay_wpcon_google_indexing_mode', function( $mode ) {
	if ( 'live' === $mode && false !== strpos( home_url(), 'staging' ) ) {
		return 'log';
	}
	return $mode;
} );

All docs

Can’t find what you need?

Our integrations team set up every JobRelay site, so they know it inside out. Get in touch and we’ll help.