Remove post date

Community Forums Forums Design Tips and Tricks Remove post date

This topic is: resolved

This topic contains 8 replies, has 5 voices, and was last updated by  rfmeier 10 months, 1 week ago.

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

    Herman
    Participant
    Post count: 89

    How do I remove “posted on” at the top of every post in focus theme without modifying genesis framework files?

    I’d like the posts to be evergreen.

    http://kneejointpainremedy.com/
    #45784

    rfmeier
    Participant
    Post count: 518

    Hello,

    Within your functions.php file, do you have code that begins with add_filter( ‘genesis_post_info’ ?


    Ryan Meier – Web Developer @ Solid Interactive
    Twitter

    #45819

    vividvilla
    Participant
    Post count: 34

    Add this code in functions.php

    /** Customize the post info function */
    add_filter( ‘genesis_post_info’, ‘post_info_filter’ );
    function post_info_filter($post_info) {
    if (!is_page()) {
    $post_info = ‘Written by  [post_author_posts_link]  [post_comments]  [post_edit]‘;
    return $post_info;
    }
    }


    Vivek R – @vividvilla
    Genesis Child Theme Designer and Blogger at WPStuffs.
    For affordable Genesis Child Theme design and Customization Contact me here

    #45842

    Herman
    Participant
    Post count: 89

    Vividvilla ..I got a fatal error after adding the code

    Fatal error: Cannot redeclare post_info_filter() (previously declared in /home/kneejoin/public_html/wp-content/themes/focus/functions.php:17) in /home/kneejoin/public_html/wp-content/themes/focus/functions.php on line 65

    rfmeier – I don’t see that code

    Thanks

     

    #45850

    pxforti
    Participant
    Post count: 67

    Change the name of the function: eg,

    add_filter( ‘genesis_post_info’, ‘post_info_custom_filter’ );
    function post_info_custom_filter($post_info) {
    if (!is_page()) {
    $post_info = ‘Written by  [post_author_posts_link]  [post_comments]  [post_edit]‘;
    return $post_info;
    }
    }


    writeNowDesign
    WordPress and Ecommerce Website Design

    #45851

    braddalton
    Participant
    Post count: 7473
    #45856

    rfmeier
    Participant
    Post count: 518

    Aside from Brad’s advice (which is what I would follow), the error: ‘Cannot redeclare post_info_filter()’ means it is already defined within your functions file, so you just have to look for that function.

    If you really wanted to remove the date, find the [post_date] within the post_info_filter function and that will remove [post_date] from the string.


    Ryan Meier – Web Developer @ Solid Interactive
    Twitter

    #45906

    Herman
    Participant
    Post count: 89

    Brad thanks for the advice..after reading your article I think I’ll create a resources page instead and leave the post dates as is.

    Ryan..appreciate your input especially from another runner:-) although I only run 3 miles/day.

    #45910

    rfmeier
    Participant
    Post count: 518

    Herman,

    Someone who runs 3 miles a day is a runner! Good luck with your site.


    Ryan Meier – Web Developer @ Solid Interactive
    Twitter

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

The topic ‘Remove post date’ is closed to new replies.