Forum Replies Created
Yes there is a comments.php file identical to the default theme I’ve not changed that at all.
event-manager and the theme is custom but I just copied the default and changed some colours.
Yes but the plugin simply creates pages, which is wordpress. I need to remove something from the theme, which makes it buddypress.
If you create any page / post in wordpress you get the ‘leave a reply’ comments section, there are links to the previous and next post in that category (in this case, events) which I want to remove, so it is actually a theme question.
Thanks for replying.
All I want to do is add a new tab to the menu, the code I’m going to be using to define what is displayed I can include elsewhere. The idea is this tab literally adds a single radio option for a user to choose an option from, then saves to a table I’ve created in my database.
However, the skeleton component seems overly complicated for this, and the bp-custom.php way of doing things does nothing.
No matter which example code I try, the only way I can get a tab to display is by putting:
‘name’ => __( ‘Media Privacy’, ‘bp-media-privacy’ ),
‘slug’ => ‘media-privacy’,
‘position’ => 80,
‘show_for_displayed_user’ => false,
‘screen_function’ => ‘bp_media_privacy’,
‘default_subnav_slug’ => ‘media-privacy’
By putting the above code directly into an included page it displays but doesn’t go to the said page. When I put it in a function and add it using add_action( ‘bp_setup_nav’, ‘my_bp_nav_adder’, 100 ); nothing happens at all.
I’m seriously confused at this point but it is vital to have this additional tab in the front end for users to be able to change this setting. I’m using a clean install of the latest Buddypress on my wamp (not putting this on my live site until it works.)
@chouf1 Will do, thank you.
However, I’ve put all this into a plugin for wordpress now and activated it – I am still not getting a tab in my profile. The above code you suggested @chouf1 doesn’t display for me at all?
Could you possible paste bin the entire plugin code for me to view to see where I am going wrong?
Yes but since its not designed for functional use I didn’t bother looking further. The plugin I’m developing will be small anyway, only a single page most likely.
Thank you for your help.
Yes thanks @modemlooper that has been suggested but I asked a question in regards to whether it requires the usual wordpress plugin info (plugin and author uri’s etc) or not?
I’ve just put the file in with my theme – this is how I develop everything to start with on wordpress and never fails. This just means its always hard coded for my testing purposes rather than being a plugin.
So it should just be bp-custom.php on it’s own in the plugin folder? There is no special code like in wordpress to give the name, uri etc?
I had looked at the buddypress info you linked to originally and found it lacking in information, it seemed to assume you knew how to develop a buddypress plugin without actually explaining if its the same as wordpress or different.
If the case is you cannot hardcode any buddypress code outside of a plugin I shall try a custom plugin, if you could possible answer my previous question of the plugin info code for me? Is it the same as wordpress or does it have to define it is buddypress?
Thanks for the info but even cutting and pasting your code into my file doesn’t work, no tab appears in my menu.
I’ve never built a buddypress plugin before so I don’t really know how to set one up – is it the same as making one for wordpress or not? Currently I’m just working with a test file within my local wordpress/buddypress set up, exactly how I test my commercial plugins before actually developing them within the wordpress plugin format.
Since this doesn’t seem to have any effect – IE, the code you gave does nothing, does it have to be within a plugin already, unlike wordpress which simply has to be accessible? If so, could you possibly link to a buddypress plugin guide (If different to wordpress itself) As I could not find a clear one myself?