Community Forums › Forums › Archived Forums › Design Tips and Tricks › Adding Author and Date Below Post Title
Tagged: author and date, code snippets, css, darling them
- This topic has 7 replies, 2 voices, and was last updated 8 years, 5 months ago by Brad Dalton.
-
AuthorPosts
-
November 2, 2015 at 5:54 pm #169949hbollingerMember
Hi, I'm setting up the Darling theme on my website and I want to add an author/date section under my my blog post titles similar to this site: http://momlifenow.com/2015/10/30/this-messed-up-beautiful-life/
Currently, it just displays the blog title. I would like to add a author/date section and customize the fonts and colors to match my website.
Is there some code or a plugin I can use for this?
http://wovenbeautiful.com/
Thanks,
Hannah
November 3, 2015 at 12:01 am #169965Brad DaltonParticipantNormally the published date and author links display in whats called the entry meta in the entry header just below your entry title.
If they're not displaying in your theme, they may have been hidden or removed using either CSS or PHP code.
Check your style.css file and your functions.php file for code which has been added.
November 3, 2015 at 1:57 am #169970hbollingerMemberThank you, Brad.
I ended up trying the Genesis simple edits plugin first and was able to get it to work that way, but then I ran into a problem with the entry footer area. The theme came set up with the entry footer displaying the category (no "filed under" label just the category name) and the comment count (just the number rather than "comments 5") - this is how my website is currently displaying. When I used the plugin, it added the words "filed under" next to the category which was nice, but it also added the word "comments" rather than just using the number - this looked great per individual post but it displayed oddly on the latest posts excerpts on my homepage.
So I looked through the code snippets and added this code to add to my functions.php file:
//* Customize the entry meta in the entry header (requires HTML5 theme support)
add_filter( 'genesis_post_info', 'sp_post_info_filter' );
function sp_post_info_filter($post_info) {
$post_info = '[post_date] by [post_author] [post_comments] [post_edit]';
return $post_info;
}I took out the [post_comments] and [post_edit] because that portion wasn't displaying correctly. I was able to add the published date and author in the entry header this way which was my original goal. It displays great on my laptop but the author/date doesn't show up on the smaller screen of my iphone. I will look through the files again to see if I can find anything. If not, I'm happy that at least it's displaying on my laptop now.
Thanks for your help,
HannahNovember 3, 2015 at 10:25 am #170002hbollingerMemberThe author and date are now displaying under the post title on my wider laptop screen, but I can't figure out why it's not displaying on my smaller phone screen.
In addition to adding some code to my function php.file, this is the code under the entries section of my stylesheet that I changed slightly for my style preferences, and it looks good on my pc:
.entry-header .entry-meta {
font-size: 13px;
font-style: italic;
text-align: center;
text-transform: lowercase;
width: 100%;
}.entry-header .entry-meta a {
color: #f27999;
}I also see this under the media queries on my stylesheet:
.entry-header .entry-meta {
display: none;
}
I don't know if this has anything to do with the "why" but I did change the "display" section to "center" but that did nothing.
I'm stuck. Any thoughts?Thanks.
November 3, 2015 at 10:39 am #170005Brad DaltonParticipant.entry-header .entry-meta { display: none; }
This CSS rule hides the entire entry meta in the entry header on smaller screens. Remove it and clear any caching.
November 3, 2015 at 11:03 am #170013hbollingerMemberI removed that css - it's still not displaying on my smaller screen. I refreshed the page but is there caching I can clear directly on my site? I know I used to have a caching plugin that I don't use anymore.
November 3, 2015 at 2:09 pm #170068hbollingerMemberIt's working now! Thanks for all your help, Brad!
November 4, 2015 at 1:35 am #170116Brad DaltonParticipant -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.