I'm writing "<?php get_forum_time() ?;> ago" but if there is no post it just prints ago. How do I write something so it won't print if it's blank?
bbPress ShowcasebbPress Showcase
taking bbPress (and WordPress) beyond your wildest dreams...
bbPress Showcase » Plugins by _ck_
-
Posted 2 years ago #
-
<?php echo get_forum_time() ?;> should work
Homepage - http://www.ashfame.com | Blog - http://blog.ashfame.com
(Contact me for bbPress & WordPress work)Posted 2 years ago # -
"<?php forum_time() ?;> ago" = "TIME ago"
but if there is NO post in a forum = "ago"
how do I write = if forum_time() is NULL print ""
Posted 2 years ago # -
Ah I didn't anticipate empty forums, which sounds kinda strange actually.
You could do this
<?php $time=get_forum_time(); if ($time) {echo "$time ago";} ?>This is a demo of the bbPress Signatures plugin!
If you use my plugins, please considering donating to help continue their development.Posted 2 years ago # -
When you're starting out new most forums are empty. Thank you, I'll try it.
Posted 2 years ago # -
-
Until I get a chance to fix it, just use
if ($time && $time!="40 years")Either that or put a topic in the empty forum.
Posted 2 years ago #
RSS feed for this topic
Post a reply to “[forum-last-poster] plugin if get_forum_time() is null”
You must log in to post.
32 users online from in the past 30 minutes. 15 bots 17 guests
7,067 views today 8,426 yesterday 16,043 peak. Most at once 50 today 62 yesterday 131 peak. Visited today: Amylawrence, guava, JeffreyCasivant, wigbuy123, gdfddfs, nandao, _ck_, summerfortun