Forum Replies Created
-
AuthorPosts
-
Chris
ParticipantThanks Elvin!
That’s great! Exactly what I’d been hoping for.
Thanks again,
Chris.Chris
ParticipantThanks Elvin!
Oops! Should’ve given you those links up front. 😅
Here’s the page with WPSP pagination:
https://nishigawakobo.com/category/drypoint-works/
And here’s a page with WooCommerce pagination:
https://nishigawakobo.com/product-category/postcards/
Thanks for having a look!Chris
ParticipantBeautiful! Just what I was hoping for.
Thanks!
Chris
ParticipantThanks Tom! That’s just about got it. The border was clashing with descenders in the title line, so I added some space above it. Also because the border can’t be spaced like type, some letter combinations were making the spacing jarring (my fault for having an author name that ends in ‘l’ 😅).
.wp-show-posts-separator { display: none; } .wp-show-posts-entry-title { padding-bottom: 5px; } .wp-show-posts-byline { border-right: 1px solid #ddd; padding-right: 1px; margin-right: 4px; }
Would it be a pain to change it so the author name is followed by a comma?
Author Name, September 1, 2020
That would clear up everything.
But if it’s not possible, I can certainly live with a few pixels of wonky spacing!
Chris
ParticipantHi Tom,
The site is still in local development, but I made a version of the relevant page:
Hope that works!
Chris
ParticipantAs below:
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 ); }
Chris
ParticipantHi Tom!
The filters are working for me, but it’s resulting in the vertical bar appearing after the date:
Author Name September 1, 2020 |
With links it appears as expected:
Author Name | September 1, 2020
Sorry I have no example link: this is still a local testing site. Thanks!
GP Pro & latest beta of WPSP
-
AuthorPosts