- This topic has 7 replies, 2 voices, and was last updated 7 years, 10 months ago by Andrew Misplon.
- AuthorPosts
- January 2, 2017 at 6:47 pm #5706
skornsteinParticipantSorry to keep bugging you. One more question, I think this one is easy. For some reason, the date now repeats on the main page: http://www.somethingsbrewing.com. It does not do this on individual posts. Any ideas? I suspect it’s showing both the post date and update date?
January 2, 2017 at 7:06 pm #5710
Andrew MisplonKeymasterNo problem at all.
If you remove the following from Custom CSS the problem will be fixed:
#main .entry-header .entry-meta .updated { display: inline-block; }
Does that break anything else we’ve done?
January 3, 2017 at 8:18 pm #5722
skornsteinParticipantHi Andrew — thanks for the quick response again. Did not seem to work. Oddly, the author name is now missing on the mobile version as well. Interestingly, the date is not repeated in Chrome incognito mode or in IE, but is in normal Chrome and Edge. I’ve tried disabling all plugins, clearing cache, etc, which did not help. Any help would be appreciated!
Just as a recap, here’s the code in Custom CSS:
/* CSS for Byline */
.entry-header .entry-meta span {
display: inline-block;
margin-right: 5px;
}
.entry-header .entry-meta span:before, .entry-header .entry-meta a:before {
content: none !important;
}
.single .entry-header .entry-meta .entry-date:before {
content: none;
}
.single #main .entry-header .entry-meta .updated {
display: none;
}/* CSS for Hover Color Change */
#page .entry-title a:hover {
color: #4e7cd8
}/* Mobile Logo */
@media (max-width: 768px) {
.site-header .site-branding {
max-width: 95%;
}
}/* Mobile Menu Icon */
.responsive-menu .menu-toggle {
top: 11px;
}And here’s the Snippet:
if ( ! function_exists( ‘puro_posted_on’ ) ) :
/**
* Prints HTML with meta information for the current post-date/time and author.
*/
function puro_posted_on() {
$time_string = ‘<time class=”entry-date published updated” datetime=”%1$s”>%2$s</time>’;
if ( get_the_time( ‘U’ ) !== get_the_modified_time( ‘U’ ) ) {
$time_string = ‘<time class=”entry-date published” datetime=”%1$s”>%2$s</time><time class=”updated” datetime=”%3$s”>%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() )
);
$posted_on = sprintf(
esc_html_x( ‘Posted on %s’, ‘post date’, ‘puro’ ),
‘‘ . $time_string . ‘‘
);
$byline = sprintf(
esc_html_x( ‘by %s’, ‘post author’, ‘puro’ ),
‘<span class=”author vcard”>‘ . esc_html( get_the_author() ) . ‘</span>’
);
$cats = sprintf(
esc_html_x( ‘in %s’, ‘categories in’, ‘puro’ ),
get_the_category_list( __( ‘, ‘, ‘puro’ ) )
);
echo ‘<span class=”posted-on”>’ . $posted_on . ‘</span><span class=”byline”> ‘ . $byline . ‘</span><span class=”cat-links”>’. $cats .'</span>’; // WPCS: XSS OK.
}
endif;January 3, 2017 at 8:27 pm #5724
Andrew MisplonKeymasterFor the mobile issue, try adding:
@media (max-width: 30rem) { .resp .entry-header .entry-meta .author, .resp .entry-header .entry-meta .cat-links, .resp .entry-header .entry-meta .tags-links, .resp .entry-header .entry-meta .comments-link, .resp .entry-header .entry-meta .edit-link { display: inline-block; } }
January 3, 2017 at 8:30 pm #5725
Andrew MisplonKeymasterAll seems normal for me now with regards to the repeated date in Chrome, FF and Safari. Any change on your side?
January 18, 2017 at 1:16 am #5777
Andrew MisplonKeymasterHi 🙂 Quick follow-up to see how things are looking on your side. Thanks.
January 18, 2017 at 11:46 pm #5783
skornsteinParticipantApologies for not following up. It worked perfectly. Thanks again. Love the theme.
January 18, 2017 at 11:58 pm #5784
Andrew MisplonKeymasterAwesome 🙂 Really glad to hear the problem resolved. Chat soon, cheers 🙂
- AuthorPosts
You must be logged in to reply to this topic.