Forum Replies Created
-
Bravo !
i know BP, no need to give me a test user access: that have no effect on your code.
You removed many things in the toolbar i guess. So i would recommand you reload a fress bp-default folder, with untouched css at least.
Apply the code and don’t touch the css! and come back with questions.
In reply to: Deleting Admin Sub-menu itemswhy did you asked in your first post what to put into your themes functions.php ? Thought his was the right place to put the changed function. The only thing you have to do is to create a child theme so you will never loose the change you did after an upgrade.
That’s why child theme is for !
Don’t make over complicated things. I never tell you to hack the core file.
In reply to: Deleting Admin Sub-menu itemsok, go to bp-members/bp-members-buddybar.php:108 (bp 1.6)
function bp_members_adminbar_admin_menu()
same routine as on previous answer
hi @number_6,
Number 2: – Why did you resign ? 😀
sticky is a WP setting. This can be done/undone when you publish a post.
The only sticky or featured related code i found is in the child theme index.php
Give a try by removing this:27
<?php if ( is_sticky() ) : ?>
<span class=”activity sticky-post”><?php _ex( ‘Featured’, ‘Sticky post’, ‘buddypress’ ); ?></span>
<?php endif; ?>or ask the author @modemlooper directly
In reply to: Member home page: "All Activity"<?phpif( bp_has_activities('user_id=1895624') ) : ?>https://codex.buddypress.org/developer/developer-docs/loops-reference/the-activity-stream-loop/
buddypress/bp-activity/bp-activity-classes.php
In reply to: How do i get the groups im admin of?witch BP version do you use ?
In reply to: Deleting Admin Sub-menu itemshi @adenicol,
you’re using the old buddybar or an old BP version, right ? Here is a solution to remove items in BP 1.5 > 1.6.x with buddybar activated, but be aware that some menus changed place in the upcoming BP 1.7
So if you mean the WP Toolbar (like here the black one on top) witch holds the group admin options, the code sit in bp-groups/bp-groups-buddybar.php
This contains only one function. Simply copy it to your (preferably child) theme functions.php, rename it, do your changes (html remove, ad/remove conditinals), deactivate the original filter and register.
original function is bp_groups_adminbar_admin_menu()
rename it to my_bp_groups_adminbar_admin_menu() (or what you want)
and do the same in the action filter.
original: add_action( ‘bp_adminbar_menus’, ‘bp_groups_adminbar_admin_menu’, 20 );
modified: add_action( ‘bp_adminbar_menus’, ‘my_bp_groups_adminbar_admin_menu’, 20 );
Resume
remove_action( ‘bp_adminbar_menus’, ‘bp_groups_adminbar_admin_menu’, 20 );
function my_bp_groups_adminbar_admin_menu() {bla bla
}
add_action( ‘bp_adminbar_menus’, ‘my_bp_groups_adminbar_admin_menu’, 20 );
@shahzaib147, so far i know there is only one Toolbar in WP
If the code works on the backend bar it should also work on the frontend !
That’s the case on my test site. Have you refreshed the page (F5) ?Or have you an extra theme with an extraaaaaa Toolbar ? Give more details about your config or a picture, because i don’t see what you’re talking about.
hi @shahzaib147,
Moving the notification count to left.
Replace the notification on the right with a link.Here is my solution !
Copy/paste the code from
http://bp-fr.net/BuddyBin/?4cf895a4c5dc62dd#EFIRmbV3LYBFSHHpXiP7oYoar9B4ZYfwi5UP5GmpIk4=and you’ll be done !
In reply to: Admin bar modificationhi @hnla,
no Hugo, it’s not “my code” ! Found it on the web and linked to it only as example purpose.
Here’s another link, probably better than the previous who explains clearly some admin_bar tweakings:
http://blog.rutwick.com/add-items-anywhere-to-the-wp-3-3-admin-barIn reply to: Admin bar modificationhave you tried to aply the old css trick margin: auto to the div containing the bar ?
http://designshack.net/articles/css/how-to-center-anything-with-css/
i have already helped you here for the same question: https://buddypress.org/support/topic/how-to-add-images-to-a-custom-toolbar/#post-156520
Let me tell you that you don’t ask for help now, but search somebody doing that plugin at your place. 👿
Go to the job board and hire a dev, if you don’t know go further with all the elements you already received. I’m not at your personal service !
In reply to: Hide the main nav bar from visitorsdon’t know your theme, sorry !
Remind that it’s a premium theme with Unlimited Live & Q&A Support from the WordPress experts, for anything to do with WordPress at all!
So you have to ask the “experts” at wpmu dev. Support is price included…. i guess.In reply to: [Resolved] How to add images to a custom toolbar?Did you opened bp-core-buddybar.php and wp-includes/admin-bar.php to see how menus are coded ?
it’s my code who generate the error.
that said, you may use this
'href’ => bp_loggedin_user_domain() . bp_get_messages_slug() . ‘/view/, ‘href’ => bp_loggedin_user_domain() . bp_get_friends_slug() . ‘/requests/,bbPress version please ?
In reply to: [Resolved] How to add images to a custom toolbar?try using this for the friend request url (not tested)
‘href’ => ( ‘bp_loggedin_user_domain() . bp_get_friends_slug() . ‘/requests/’ )
and this for the messages
‘href’ => ( ‘bp_loggedin_user_domain() . bp_get_messages_slug() . ‘/view/’ )i also answered to you here
https://buddypress.org/support/topic/how-to-split-out-buddypress-notifications-drop-down-items-to-their-own-top-level/In reply to: Hide the main nav bar from visitorsyou have to create a child theme to di this correctly.
Then add /bp-default/header.php to /your-child/header.php
Line 42 is a php content who begins by wp_nav…..At the begin of the line, just after the php opening tag, add
if ( is_user_logged_in() ):
wp_nav_content…. bla bla…and at the end of the line, just before the php closing tag, add endif;
The nav bar is now hidden for any not logged in visitor
In reply to: [Resolved] Page not found when create new groupsHi @qzplx,
Raffaell, only one solution: a can of gasoline and a match ! 😀
Have you FTP access ? If yes, you can rename each plugin in the plugin folder. This will deactivate them.
Control this on your dashboard.Rename also your current theme (frisco for buddypress) when on FTP
Then reinstall a fresh copy of buddypress and activate bp-default theme and redo BP’s settings.
here’re the 3 counter. Their names are explicit enough i guess to see the right place where to use 😉
echo bp_friend_get_total_requests_count( $user_id );
echo bp_get_total_unread_messages_count($name );
echo count($notifications);
i’m not sure of what you exactly want, but here’s something who gives you a header menu based on text links who leading to the expected member part. The example given here works on bp-default 1.6.4 (may also work on previous versions)
What to do ?
add an action call in your theme’s header.php
add a function in your theme functions.phpin header.php, after the h1 closing tag, add
<?php do_action ( 'my_header_menu_bar' );?>add this function to your theme functions.php
function my_header_menu () { if ( is_user_logged_in() ) { ?> <div style="display:inline; width: 200px;float:left; "> <a href="<?php echo bp_loggedin_user_domain() . bp_get_friends_slug(); ?>/requests/">Friends request</a> <a href="<?php echo bp_loggedin_user_domain() . bp_get_messages_slug(); ?>/view/">Messages</a> <a href="<?php echo bp_loggedin_user_domain() . bp_get_messages_slug(); ?>/notices/">Notices</a> </div> <?php } } add_action ( 'my_header_menu_bar', 'my_header_menu' );This is a rought example. You can now add img tag to replace the text in each a tag and play with css to style the div contained in the function (actually containing inline style). If you give it a class name, you can add the style to your theme style file.
In reply to: Removing reply button from activity stream…hidding things with CSS is not best practice, even if it works. The button is still on the page. Display:none just hide it from visitors. But the code stays in place.
A simple way to remove the comment button from the activity stream is to add a filter in your theme functions.php
* Determine if a comment can be made on an activity item
add_filter('bp_activity_can_comment','__return_false');
There’re some other filters in bp-activity-template.php, such as
* Determine if a comment can be made on an activity reply item
* Determine if an favorites are allowed…In reply to: Admin bar modificationhi @panoravu,
for css styling, be inspired by this: http://www.php-ease.com/code/wordpress-style-admin-bar.html
If you want to code something into the Toolbar, you have to play with the wp_admin_bar filter.
The function goes then to your theme functions.php
Based ons omething like this
function my_function( $wp_admin_bar )
{
/* what you need here */}
add_filter( ‘admin_bar_menu’, ‘my_function’ );Google around to find many answers about the WP Toolbar, like this one:
http://technerdia.com/1140_wordpress-admin-bar.htmlIn reply to: [Resolved] How to detect use is on a bp pageif you’re working on 1.7 consider here: http://bpdevel.wordpress.com/tag/bp_user_query/
In reply to: BP 1.3.4 default theme css questionshi @p2ab,
on BP 1.6.x, a child theme contains at first only one file: style.css
The only thing to add in are comment tags.
/**
* Theme Name: what you want
* Description: what you want
* Version: what you want
* Author: what you want
* Template: bp-default (this is very important: it’s the name of the parenttheme)
* Tags: blue, buddypress, two-columns, white…. (what you want)
**/default.css is the buddypress main css file and you don’t have to copy it to your child theme.
Also, you have nothing to import ! This is optionnal and not necessary.
Just use the same ID and class names of the parts you want to customize and do your css modifications.
Remeber also that in a few weeks, BP 1.7 will be avaible and will let you use any existing WP theme with the opportunity to spare some long tweaking to recreate the wheel. Perhaps.
https://codex.buddypress.org/legacy/building-a-buddypress-child-theme/building-a-buddypress-child-theme-for-bp-1-2/
https://codex.wordpress.org/Child_Themes