Remove the Date from Blog Posts?

Community Forums Forums Design Tips and Tricks Remove the Date from Blog Posts?

This topic is: resolved

This topic contains 8 replies, has 2 voices, and was last updated by  sanjeev 11 months, 1 week ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #39643

    Scott Milford
    Participant
    Post count: 19

    Hi all!

    I’d like to not have the date show on my blog posts because the content is meant to be evergreen and a date might make it seem like old information. I don’t see an option in the admin panel anywhere for the Fabric theme, so I guess I’m going to have to dig into a php file.

    Does anyone know how I can prevent the dates from showing up with my blog posts?

    Thanks,

    Scott

    http://behaviorandmotivation.com
    #39652

    sanjeev
    Participant
    Post count: 34

    If you are talking about the date shown in byline, then you can customize it through a function…Example code snippet can be found at http://my.studiopress.com/snippets/post-info/#customize

    Let me know what you want to show and I can give you the code to copy it child function.php file…..


    Meet me at: Make Web World

    #39761

    Scott Milford
    Participant
    Post count: 19

    Sanjeev,

    Thanks for your reply. You are correct. It’s the date near the by-line. Basically, I don’t want the date to show at all. Is that doable?

    Scott

    #40019

    sanjeev
    Participant
    Post count: 34

    ok, in that case you can use the code mentioned in the link I mentioned:

    http://my.studiopress.com/snippets/post-info/#customize

    Just remove the ‘[post_date] by’ from the $post_info and it should stop displaying date….


    Meet me at: Make Web World

    #40020

    sanjeev
    Participant
    Post count: 34

    here is the customized code which will only display Author in the by line…

    
    add_filter( 'genesis_post_info', 'post_info_filter' );
    function post_info_filter($post_info) {
    if ( !is_page() ) {
     $post_info = 'By [post_author_posts_link]';
     return $post_info;
    }}
    
    

    If you want to add anything more you can add it after [post_author_posts_link].


    Meet me at: Make Web World

    #40221

    Scott Milford
    Participant
    Post count: 19

    Sanjeev,

    That worked. Thanks. However, it also removed some information that I’d like to keep. Here’s a before and after:

    Was:
    May 7, 2013 by  · 6 Comments (Edit)

    Now:
    “By 

    How can I make it look like this?

    “by  · 6 Comments (Edit)

    Thanks for your help, Sanjeev. You’re awesome!

    #40223

    Scott Milford
    Participant
    Post count: 19

    I was able to get it to display properly, but the weird thing is that it’s only displaying properly on the archive pages. On the Home page, it only displays my name.

    Here’s what my code looks like right now:

    /** Customize the post info function */
    add_filter( ‘genesis_post_info’, ‘fabric_post_info_filter’ );
    function fabric_post_info_filter($post_info) {
    return ‘by [post_author_posts_link] · [post_comments] [post_edit]‘;
    }

    Sorry about the code. I don’t know how to use Pastebin (or anything else) so that it is formatted the right way.

    • This reply was modified 11 months, 1 week ago by  Scott Milford.
    • This reply was modified 11 months, 1 week ago by  Scott Milford.
    #40228

    Scott Milford
    Participant
    Post count: 19

    Hmmm…. I don’t get it. I checked it again and it seems to be displaying correctly on the Home page and all other pages, too. It’s showing the “By” line and the comment link as well, just as I wanted it.

    So I guess everything is good now. Thanks so much for your help, Sanjeev. I sincerely appreciate it!!

    Cheers!

    #40229

    sanjeev
    Participant
    Post count: 34

    It might be your cache plugin, which takes some time to show changes for the cached pages…

    Your code looks fine, so it is ok….Glad I was able to help…


    Meet me at: Make Web World

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘Remove the Date from Blog Posts?’ is closed to new replies.