创建了一个template.php,并希望删除
<article class="post-11 page type-page status-publish entry" itemscope itemtype="http://schema.org/CreativeWork">
这是我身体里的..。我想有一个创世记功能,但我无法在这里或通过谷歌找到。
如有任何帮助,gr8ly将不胜感激。
吉姆
发布于 2017-04-05 16:48:03
add_filter( 'genesis_attr_entry', 'change_my_attributes_entry' );
/**
* Remove a class for entry element.
*
*
*
* @param array $attributes Existing attributes for entry element.
* @return array Amended attributes for entry element.
*/
function change_my_attributes_entry( $attributes ) {
$classes= get_post_class();
if( ( $key = array_search( 'status-publish', $classes ) ) !== false )
unset( $classes[$key] );
$attributes['class'] = join( ' ', $classes );
return $attributes;
}https://stackoverflow.com/questions/43236047
复制相似问题