Forum Replies Created
-
Hey thunksalot
You have to upload widgets to your theme directory, never modify the contents of a plugin directory.
So e.g. add a “widgets” directory in your theme directory and upload it to there. Then you should see a “Smart BuddyPress Sitewide Notices” widget in the WordPress backend. Activate that and disable the default one.That would be perfect!
I checked out the code and sadly, buddypress only seems to notice if there isn’t any notice to display while displaying them. I had to write a slightly modified version of the widget to get the desired functionality. For anyone who needs this too, feel free to use this: https://gist.github.com/chlab/ad608eafe2e1262140fb
It’s no more than a copy of the regular widget which fetches the notices in an output buffer and aborts when there isn’t any content to display.Ok so I activated the widget and it works! So thanks for that!
However: the widget box shows in the sidebar even when the notice is closed. Is this normal? Is there a way to get the widget to disappear when it has nothing to show?
danbp: yeah I saw that comment but didn’t try the widget because I didn’t see it in the backend and I was too lazy to find out why I don’t have it 🙂
I’ll go try the widget and report back.
Thanks.Thanks Hugo, that helps. It was the style.css. It hat a
Template: bp-default
in it. I didn’t notice it at first because our theme is named similarly and my mind read it as the title of our theme. If I remove it, my templates are included.Now I have to find out how to upgrade the theme so it no longer relies on the bp-default theme.
I read it here and here, but maybe it will always show up as you said because we updated from an earlier version.
The files are named correctly, as with the twentyfourteen theme the files are being included.
My next step will be to build a theme from scratch and see if I can get it to include the files.
Update:
I copied my theme/buddypress directory into the twentyfourteen directory and now my files are being included. So the problem is with my theme. What could cause the template hierarchy to be ignored in a custom theme? I’ll try getting rid of as much as possible to see if I can get it work.
Thanks for your answer.
I don’t care whether or not the template shows up there 🙂 but I am interpreting this as a sign that it is still in use somehow, which should not be the case.