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 1 year 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 1 year 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 1 year 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 1 year ago # -
When you're starting out new most forums are empty. Thank you, I'll try it.
Posted 1 year 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 1 year 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.
39 users online from in the past 30 minutes. 14 bots 24 guests 1 members: mccawphoto
197 views today 7,784 yesterday 14,010 peak. Most at once 39 today 63 yesterday 131 peak. Visited today: mccawphoto