Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change Column Last Post time format: min&hours move to day only

  • @neon67

    Participant

    Please advise the correct way to Change Column Last Post time format: write only day instead of min & hours.
    – today
    – yesterday
    – 2 days ago…3…
    and so on … without minutes and hours.

Viewing 4 replies - 1 through 4 (of 4 total)
  • @wpturk

    Participant

    You can remove everything between comma “,” and “ago” this way: (put in functions.php)

    function short_time ($output) {
        $output = preg_replace( '/, .*[^ago]/', ' ', $output );
        echo $output;
    }
    add_action ('bbp_get_time_since', 'short_time') ;

    @neon67

    Participant

    Oh thanks. This is almost what I wanted.

    But instead of
    today – shown “no answers”
    yesterday – “1 day ago”
    …. where and that this changing?

    What mean —between comma “,” and “ago”—- this code slice: .*[^ago]/’ ..?

    @neon67

    Participant

    Thanks everyone! Found a solution in the bbpress codeх

    @robin-w

    Moderator

    great – glad you are fixed

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar