Skip to:
Content
Pages
Categories
Search
Top
Bottom

Shorten Freshness


  • manteli
    Participant

    @manteli_bbp

    Using latest versions of WP and bbPress. I’ve been searching and searching, is there anyone who could help me to shorten the freshness to show only year(s) OR week(s) OR day(s) OR minute(s) instead of the whole time stamp?

    I found this https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/#10-shorten-freshness-wording but it doesn’t seem to work properly. I don’t know if I’m missing something. I still got “1 hour, 20 minutes” etc. Is the code supposed to do this / is it possible to show only one time variable like this?

    50 seconds ago
    33 minutes ago
    2 hours ago
    3 days ago
    1 year ago
    etc

    I would be so happy if someone could help! Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi,
    It should work if you pasted it correctly somewhere.
    If you don’t manage, you can try to install the bbP Toolkit (https://wordpress.org/plugins/bbp-toolkit/) as it is now one of the options.
    Pascal.


    o.m.j
    Participant

    @omj-1

    @casiepa , that’s a nice plugin, thx!


    manteli
    Participant

    @manteli_bbp

    Hi Pascal! Thank you for your answer. I tried the bbP Toolkit plugin but it didn’t work either.

    I’m using the Enfold theme and have already tested 1) adding code to theme functions.php 2) using code snippets plugin which works fine with other active snippets 3) using code snippets after switching to basic theme for testing purposes. None of these worked.

    Maybe some of my plugins is conflicting, I keep searching and update this if I find the reason.

    Well, it works for others, so indeed, it must be something on your side. Could be your theme, child theme or plugin issues. Try to switch to a default theme, then deactivate all plugins and reactivate one by one…


    manteli
    Participant

    @manteli_bbp

    Hi Pascal! I finally found the reason: it is the bbpress language file.

    I started everything from scratch and tested theme and plugins one by one. Your plugin works like a charm! 🙂

    But when I finally switched my test site to my language (Finnish) and uploaded the language files (.po and .mo in wp-content/languages/plugins folder) it automatically makes a switch to the standard longer time stamp. How is this happening, can you help me with this? Thanks!

    Hi Mantelli,
    That issue is coming from the toolkit, so you should use the support there: https://wordpress.org/support/plugin/bbp-toolkit

    (I can confirm that it only works for English, but I have to ask you to open the support case there to get the workaround)

    Pascal.

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