-
Henry replied to the topic [Resolved] Conditional check for activate page in the forum How-to & Troubleshooting 11 years, 5 months ago
@sbrajesh thank you! Adding
exit(0);
nailed it!bp_is_current_component( ‘activate’ )
and‘activate’ == bp_is_current_component()
andbp_is_activation_page()
andis_page('activate')
all work by themselves – it was my function that was missing an exit statement that was the problem. Thanks to @sbrajesh it’s all sorted now. -
Henry replied to the topic Child Theme – How to partially inherit the default theme’s CSS in the forum How-to & Troubleshooting 11 years, 5 months ago
The easiest way to inherit ‘some’ of the CSS from the default theme is to copy what you need and paste it into your theme’s style.css.
Then add this to your functions.php file
if ( !function_exists( 'bp_dtheme_enqueue_styles' ) ) :
function bp_dtheme_enqueue_styles() {}
endif;This will tell BuddyPress not to queue up the default…[Read more]
-
Henry replied to the topic Amend Members Directory title in the forum How-to & Troubleshooting 11 years, 5 months ago
Instead of editing the text strings in the core or you theme’s files, you can use a language translation file. It makes life much easier:
https://codex.buddypress.org/developer/customizing/customizing-labels-messages-and-urls/
-
Henry replied to the topic [Resolved] Conditional check for activate page in the forum How-to & Troubleshooting 11 years, 5 months ago
I am trying to redirect logged-in users away from the activate page if they try to access it. This is what I have which isn’t working
//redirect logged-in users away from activate page
function bp_redirect_activate_to_profile() {
global $bp;if ( is_user_logged_in() && bp_is_activation_page() ) {
wp_redirect( $bp->loggedin_user->domain…[Read more] -
Henry replied to the topic [Resolved] Conditional check for activate page in the forum How-to & Troubleshooting 11 years, 5 months ago
Hi @sbrajesh
Have you tested
bp_is_activation_page()
recently? Both that andbp_is_current_component( 'activate' )
don’t seem to be working for me even though similar functions such asbp_is_register_page()
work perfectly. -
Henry started the topic [Resolved] Conditional check for activate page in the forum How-to & Troubleshooting 11 years, 5 months ago
Anyone know how to check when the currently viewed page is the activate page? “example.com/activate”
I thought it would be something like this but it doesn’t work:
if ( is_page('activate') ) {
//do something
} -
Henry replied to the topic Autosuggest in core? in the forum How-to & Troubleshooting 11 years, 5 months ago
@djpaul I thought the members search also had the autosuggest feature?
-
Henry replied to the topic Help with homepage redirect to Profile Page in the forum How-to & Troubleshooting 11 years, 5 months ago
You don’t need to put any code in your homepage template. @bphelp‘s code goes into your bp-custom.php file.
I am using a slightly different method. Copy and paste this into your theme’s functions.php file.
//redirect logged in users away from homepage to their profile page
[Read more]
function bp_homepage_to_profile() {
global… -
Henry replied to the topic Help with homepage redirect to Profile Page in the forum How-to & Troubleshooting 11 years, 5 months ago
@bphelp nice new blog! looking forward to hearing some tips and tricks…
-
Henry replied to the topic BuddyPress//Jigoshop issues in the forum How-to & Troubleshooting 11 years, 5 months ago
You’ll need to post a link to your website and/or provide screenshots of the problem. It will likely be a CSS issue
-
Henry replied to the topic Setting up Dummy users on BuddyPress on Local dev Machine in the forum How-to & Troubleshooting 11 years, 5 months ago
I haven’t used this plugin but it looks as though it will do what you need:
-
Henry replied to the topic don't want registration page to show after login in the forum How-to & Troubleshooting 11 years, 5 months ago
That code needs to go in your theme, replacing your current menu. It doesn’t go in functions.php. Try looking in header.php. you’re looking for wp_nav_menu
-
Henry replied to the topic don't want registration page to show after login in the forum How-to & Troubleshooting 11 years, 5 months ago
It works for me on a menu I’ve called footer.
I reckon the 2 menu approach will be easier anyway . you’ll have to create another menu in wp admin but that should be straight forward just a little time consuming.
-
Henry replied to the topic Changing the avatar size on the Members page in the forum How-to & Troubleshooting 11 years, 5 months ago
if you want to make the avatar a bit bigger you could try
<?php bp_member_avatar( 'type=thumb&height=100&width=100' ); ?>
-
Henry replied to the topic don't want registration page to show after login in the forum How-to & Troubleshooting 11 years, 5 months ago
With reference to your code, you have
primary-nav
where you should haveMain-Menu
. Also, don’t forget to log out when you check if the register link is in the menu. It’ll only be visible to logged-out users -
Henry replied to the topic don't want registration page to show after login in the forum How-to & Troubleshooting 11 years, 5 months ago
@hnla actually suggested an easier option i almost overlooked. You could set up 2 menus in WP Admin and display them in your theme according to the logged-in status of the user:
<?php
[Read more]
if ( is_user_logged_in() ) {
wp_nav_menu( array( 'theme_location' => 'user-loggedin-menu' ) );
} else {
wp_nav_menu( array( 'theme_location' =>… -
Henry replied to the topic Changing the avatar size on the Members page in the forum How-to & Troubleshooting 11 years, 5 months ago
Ah OK.
Remove this bit
<?php bp_member_avatar( 'type=full&width=750&height=750' ); ?>
and replace it with
<?php bp_member_avatar( 'type=thumb&height=30&width=30' ); ?>
-
Henry replied to the topic don't want registration page to show after login in the forum How-to & Troubleshooting 11 years, 5 months ago
@benjino use the last function i posted, making sure to replace CHANGE-THIS with the name of the menu you want to target. The name of the menu can be found in WP Admin, when you set-up the menu, you had to give it a name.
-
Henry replied to the topic don't want registration page to show after login in the forum How-to & Troubleshooting 11 years, 5 months ago
@hnla I searched for the thread you mentioned which had the solution already posted. Can be found here:
https://buddypress.org/support/topic/adding-dynamic-profile-link-to-main-menu-item/
-
Henry replied to the topic don't want registration page to show after login in the forum How-to & Troubleshooting 11 years, 5 months ago
OK here is my revised first function (which works now). It will target a specific menu of your choosing. Just replace CHANGE-THIS with the name of the menu you want to target.
function custom_menu_item ( $items, $args ) {
if ( !is_user_logged_in() && $args->menu == 'CHANGE-THIS' ) {
$items .= '<li><a href="/register"…[Read more] - Load More
@henrywright-1
Active 9 years, 10 months ago