Hi @srijithkariyattil
We can do this with CSS and PHP hooks.
but to clarify w/ functionality:
Are you trying to copy the functionality as well? If yes, I’m not exactly sure if WP Show Posts is the right plugin for this one.
The date doesn’t seem like a post date but rather, an event date.
In this case, I think what you need is something like The Events Calendar plugin.
But to answer your question:
Let’s remove the default date by unchecking it on the WP Show Posts list setting’s Meta tab.
You then re-add it back before the title and thumbnail using this PHP snippet.
add_action('wpsp_before_header', function($settings){
if( 18984 == (int)$settings['list_id']){ //apply to specified WPSP ID
$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">
<a href="%1$s" title="%2$s" rel="bookmark">%3$s</a>
</span>',
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
$time_string
);
}
},10,1);
Once applied, let me know to reinspect the page and do the CSS writeup. ??