I have the same question and came here hoping someone had answered it. I’ll keep poking and post here if I figure anything out.
Try editing /single.php and /page.php in your child theme.
Edit the_time()’s parameters to add the date:
https://codex.wordpress.org/Function_Reference/the_time
Thanks @r-a-y . That worked for me on the individual blog posts. How do I get the change to also appear on the homepage? That is, when people are on the homepage, they still see the old time-only format. When they click on the post, the time and date appear on the post page.
If you’re talking about activity updates, you’ll need to apply a filter to “bp_activity_time_since” (located in bp-activity/bp-activity-templatetags.php).
Something like this in your theme’s functions.php:
function my_bp_activity_time_since($relative_time, $activity) {
// use date parameters – http://php.net/manual/en/function.date.php
return date(‘FORMAT YOUR TIME’, $activity->date_recorded );
}
add_filter( ‘bp_activity_time_since’, ‘my_bp_activity_time_since’, 1, 2 );
I’m not sure it’s the activity updates. See the homepage here: http://nextnewsroom.com. The time at the top of each posts just shows the time, not the date. If you click on the title of post, it displays time and date. Wondering why that change wouldn’t appear on the homepage as well as on the invidividual post?
Oh that, you’ll need to modify index.php and do the same thing mentioned three posts above.
@r-a-y Thanks. Do you mean I need to do the same thing I did to /pages and /posts? I did make the change in posts, but not pages. I didn’t see any reference to time in on pages.php or index.php. Any suggestion where I put it?
Copy over /bp-themes/bp-default/index.php to your child theme and do the same thing I mentioned here:
There is a reference to the_time(), so I’m not sure what you’re talking about.
Hey @r-a-y I ran into this today as well… This fix is as you said in the files you said.
Simply delete the existing line and add this line to the files in question:
-?php the_time(‘F j, Y’); ?- at -?php the_time(‘g:i a’); ?-
Change – (minus signs) to PHP angled brackets.
Seems like this should be in the default-theme from the get-go… maybe a ticket?
I have to admit I’m still confused–there is no the_time() reference in index.php, nor is there any obvious place that I can see where you would insert such a date command. I just want the date of a blog post to appear on the main page, as it would in an ordinary WordPress blog installation, but it’s unclear to me where one would do so.
@newrambler – for /index.php, it’s on line 26:
https://trac.buddypress.org/browser/tags/1.2.5.2/bp-themes/bp-default/index.php
@pisanojm – maybe a filter on the_time() would suffice, some might like the existing relative time. Definitely create an enhancement ticket!
@newrambler this is in the index.php of the buddypress theme… you have to go into the buddypress plugin –> then theme….