hi @sonic1243,
you have to add get_sidebar in to your custom activity template.
See in one of the bp-default files how it looks alike. (archives.php for example)
Cheers chouf .. I have tried this, the bottom two lines of my /activity/index.php are:
get_sidebar and get_footer
Yet no sidebar shows up …
Stuck I am … been scratchin’ my head for over a week now ..
If you have no widgets in the sidebar, it can’t show up !
If you changed your recently widgetized template to your own, you prabably need to reactivate all your widget. This is a common wordpress user situation, something between keyboard and chair.
It arrived to me also in the past. 😀
You have also to respect the bp-default theme hierarchy. Folder, files must be exactly at the same order and the same name in the child theme. You use a child theme at least ?
Ah no – this test site is a pretty large and well set up community site very nearly ready to go live – I’ve made the theme myself and have 4 of my own widget areas and 20 odd plugins and all sorts running – the entire site functions really well – except the single activity pages ….
I would post a link but I’d rather not publicly post the links to my test sites.
So, to be clear, I have a wonderful template with a packed sidebar and some great features, every BP page within the site works great, the only thing I can’t control is when you click a ‘date’ and it takes you to the single activity; like “activity/154” – this page is broken.
The page I’m trying to control is the same as this:
http://testbp.org/members/frucuatenun1986/activity/177066/
No sidebar, and something slightly different about these pages, isn’t there?
It’s a different template entirely, it ommits the padder within the container.
I’ve scanned the default functions.php and can see references to a secondary avatar; perhaps referring to the largest size avatar as used on these activity pages – but nothing else in there to suggest “if activity single; use different template” …
In bp-default, single activity uses: activity/entry.php
But it is used by activity/activity-loop.php to display each entry in the entries list.
So any changes to entry.php will show up in the loop.
And obviously, you can’t add get_sidebar to entry.php.
So how to use a different template when viewing a single activity entry ?
You’d have to know how to parse the ‘action’ of the URI and handle it from there.
iow. $bp->current_action, $bp->action_variables
Probably easier to kill the link on the ‘date’ of an entry in the loop – or maybe just when it’s not a discussion.
( Or is there some reason you want to show non-discussion activity on a single page ? )
To kill the link, you have 2 filtering choices:
1. Before display ( needs to run every time an entry is displayed )
2. Before creating the database entry ( runs only once per entry )
Number 1 is easier.
Number 2 is the better approach – but won’t alter entries already in the database.
Ahh thank you .. yes I wondered if killing the link would be the best solution.
It’s the first time I’ve used BP so plenty to learn.
But I am no php coder .. I’ve just looked through the file and can’t see any way to hack and remove the link via html .. Damn ..
How about a filtery thing in functions.php to disable the link?
And, erm, isn’t this a common problem for people making themes? How about an option within BP to disable single activity entries? What’s the point in it displaying differently anyway?!
Thanks…
Thank you! That’s the one …
/members/single/activity/permalink.php
Cheers Shane : )
@shanbp … thanks for the link reference. I’m adept at WordPress customization but the missing sidebar was a puzzle.