Quantcast
Channel: Topic Tag: xml | WordPress.org
Viewing all articles
Browse latest Browse all 3201

Scott Basgaard on "[Plugin: WP Job Manager] Expired Job to be listed into the WordPress SEO XML sitemap"

$
0
0

I haven't tested this yet with WPSEO but it might work using the 'wpseo_posts_where' filter to add an additional post status:

function wpjm_include_jobs_in_sitemap( $filter, $type ) {

	if ( $type == 'job_listing' ) {
		$filter .= ' AND post_status = "expired" ';
	}

	return $filter;
}
add_filter( 'wpseo_posts_where', 'wpjm_include_jobs_in_sitemap', 10, 2 );

You would add something like this to your functions.php template file.

Other than that I'm not sure of a XML sitemap generator that does this out of the box.

Kind Regards,
Scott


Viewing all articles
Browse latest Browse all 3201

Trending Articles