- This topic has 18 replies, 2 voices, and was last updated 7 years, 6 months ago by Andrew Misplon.
- AuthorPosts
- April 6, 2017 at 9:47 pm #6215
skornsteinParticipantHello — I just realized that when I publish a new post and and post date is today, it doesn’t show a date in the byline? Could you share a fix?
http://www.somethingsbrewing.com
Thanks!
Sam
April 6, 2017 at 9:53 pm #6217
Andrew MisplonKeymasterHey Sam
I need to perhaps relook at the customization we did for you. Please, remind me, was the original task to remove the icons and change the format to:
Posted on {date} by {author} in {categories} ?
April 8, 2017 at 9:36 pm #6248
skornsteinParticipantHi Andrew,
The CSS is:
/* 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;
}And the snippet is:
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;Thanks!
April 9, 2017 at 10:21 am #6249
Andrew MisplonKeymasterThanks.
Try changing your CSS as follows:
/* 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; } .entry-header .entry-meta .updated { display: inline-block; }
April 9, 2017 at 9:08 pm #6256
skornsteinParticipantIt works! Thank you, sir.
Is there an easy to to put the featured image below the post title on the front page when I only show excerpts of posts? If it’s a pain, no worries. But I just switched from full posts to excerpts, and would love to switch the order.
Thanks Andrew!
April 10, 2017 at 8:15 am #6262
Andrew MisplonKeymasterGlad that helped.
Not without getting into the files. We can do it but we’d need to switch the order of the code as it’s loaded. Let me know 🙂
April 10, 2017 at 2:17 pm #6269
skornsteinParticipantIf you’re up for it, I am!
April 10, 2017 at 2:21 pm #6270
Andrew MisplonKeymasterSo only on archive pages? Not on the single page. Correct?
April 10, 2017 at 2:26 pm #6272
Andrew MisplonKeymasterIf so then add this file to your child theme:
https://purothemes.com/wp-content/uploads/2017/04/content.php_.zip
Unzip first.
April 11, 2017 at 2:48 am #6279
skornsteinParticipantThanks Andrew. It works! However, I wasn’t previously using a child theme, and when I added the child that came with the original puro download, some of the settings from the original changed (e.g., to show excerpts), and many of the widgets disappeared. I could manually change these back, but wasn’t sure if this was indicative of a larger issue with the child theme I set up. Any thoughts?
April 11, 2017 at 8:27 am #6282
Andrew MisplonKeymasterChild theme changes the theme slug so everything resets. Download plugin called Customizer Import/Export plugin, go back to parent, download settings, change to child, import settings.
On my phone so description brief 🙂
April 13, 2017 at 7:37 pm #6291
skornsteinParticipantThanks Andrew. All fixed now, however, with the child theme, for some strange reason it now shows both the post date and update date side by side like this: Posted on April 10, 2017April 11, 2017 by Sam Kornsteinin General
Any thoughts on an easy fix?
April 13, 2017 at 7:57 pm #6292
Andrew MisplonKeymasterIs the Custom CSS I sent being applied to the child theme? Is it still active?
April 13, 2017 at 9:10 pm #6293
skornsteinParticipantStill active, and other customm css insertions are working. It’s strange. Even when I comment out the CSS for byline, it looks the same.
April 14, 2017 at 5:55 am #6294
Andrew MisplonKeymasterTry removing this from Custom CSS:
.entry-header .entry-meta .updated { display: inline-block; }
- AuthorPosts
You must be logged in to reply to this topic.