Home › Forums › Pro Support › Remove Links from date/author › Reply To: Remove Links from date/author
January 28, 2018 at 8:14 pm
#3452
Keymaster
Hi there,
Sorry for not getting back to you sooner!
WPSP uses different filters. This should help:
add_filter( 'wpsp_author_output', 'tu_wpsp_remove_author_link' );
function tu_wpsp_remove_author_link() {
printf(
'<span class="wp-show-posts-byline wp-show-posts-meta">
<span class="wp-show-posts-author vcard" itemtype="http://schema.org/Person" itemscope="itemscope" itemprop="author">
<span class="author-name" itemprop="name">%1$s</span>
</span>
</span>',
esc_html( get_the_author() )
);
}
add_filter( 'wpsp_date_output', 'tu_wpsp_remove_date_link' );
function tu_wpsp_remove_date_link() {
$time_string = '<time class="wp-show-posts-entry-date published" datetime="%1$s" itemprop="datePublished">%2$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string .= '<time class="wp-show-posts-updated" datetime="%3$s" itemprop="dateModified">%4$s</time>';
}
$time_string = sprintf( $time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);
printf(
'<span class="wp-show-posts-posted-on wp-show-posts-meta">%1$s</span>',
$time_string
);
}