Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jerome281

    (@jerome281)

    Does the plugin support other statuses to ‘publish’? I’m trying to enable ‘expired’ a custom post status to be listed into the xml sitemap?

    Thread Starter jerome281

    (@jerome281)

    Maybe the fix would be to see how can I exclude CPT’s with a custom post status ‘expired’ from the generated sitemap?

    Thread Starter jerome281

    (@jerome281)

    I’ve tried

    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 );

    The code seem to break the post type job_listing-sitemap.xml listing only 1 link to the /jobs page. Any tips?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WP Job Manager plugin – Expired job missing from the XML sitemap’ is closed to new replies.