文章归档

删除文章标题的受保护字样

function the_title_trim($title) {
	$title = attribute_escape($title);
	$findthese = array(
		'#Protected:#',
		'#Private:#'
	);
	$replacewith = array(
		'', // What to replace "Protected:" with
		'' // What to replace "Private:" with
	);
	$title = preg_replace($findthese, $replacewith, $title);
	return $title;
}
add_filter('the_title', 'the_title_trim');
add_filter('protected_title_format', 'no_title_prefix');
add_filter('private_title_format', 'no_title_prefix');

function no_title_prefix( $prefix ) {
return '%s';
}

无觅相关文章插件,快速提升流量