-
Henry Wright replied to the topic Warning: Illegal string offset 'slug' in the forum How-to & Troubleshooting 7 years, 4 months ago
What code do you have at line 102 in themes/buddyapp/lib/plugins/buddypress/navigation-icons.php?
-
Henry Wright replied to the topic Change member URL on members directory page? in the forum How-to & Troubleshooting 7 years, 4 months ago
You can change the URL of that page in the admin area (see Pages).
-
Henry Wright replied to the topic Can I make this Profile data any better? in the forum How-to & Troubleshooting 7 years, 4 months ago
empty()
is also useful in these situations. -
Henry Wright replied to the topic Can I make this Profile data any better? in the forum How-to & Troubleshooting 7 years, 4 months ago
You could use a loop but considering there’s just 3 items, it looks readable enough to me.
-
Henry Wright replied to the topic Conditional redirect for non-logged in users in the forum How-to & Troubleshooting 7 years, 4 months ago
Is https://www.example.com/example/ a WordPress page? If it is you can target it with
if ( is_page( 'example' ) ) {
// Do something.
}Also, I just added the code below and I can still access the members directory when not logged in
Where did you add the snippet? The code should work.
-
Henry Wright replied to the topic Conditional redirect for non-logged in users in the forum How-to & Troubleshooting 7 years, 4 months ago
The code should go in your bp-custom.php file.
Ref https://codex.buddypress.org/themes/bp-custom-php/
That looks like it would work for my members directory but what about doing this for a conditional redirect for a specific post page?
Which post page are you referring to?
-
Henry Wright replied to the topic Conditional redirect for non-logged in users in the forum How-to & Troubleshooting 7 years, 4 months ago
Here’s an example which will redirect all unauthenticated members/ page visitors to the homepage.
add_action( 'init', function() {
if ( ! is_user_logged_in() && bp_is_members_directory() ) {
bp_core_redirect( site_url() );
} else {
// Do nothing.
}
} );Feel free to change
site_url()
to the URL of your landing… -
Henry Wright replied to the topic Issue With YITH Frontend Manager Plugin in the forum Third Party Plugins 7 years, 4 months ago
Or you can try to access to some page in WordPress admin area (e.g.: with an ajax call) ?
BuddyPress doesn’t do this by default. Considering you can’t reproduce, I expect the client is using custom code that’s causing the problem (either in their functions.php file, bp-custom.php file or in an activated plugin). Check those 3 locations on your…[Read more]
-
Henry Wright replied to the topic Issue With YITH Frontend Manager Plugin in the forum Third Party Plugins 7 years, 4 months ago
Page 2 seems to be loading the my-account page. That’s pretty strange. How are you customising the members/ page loop?
-
Henry Wright replied to the topic Notifications in the forum How-to & Troubleshooting 7 years, 4 months ago
has someone created any CSS code that might be useful to get this done.
This will need a PHP solution. Unfortunately CSS won’t help.
-
Henry Wright replied to the topic [access request]Documentation contribution in the forum Requests & Feedback 7 years, 4 months ago
-
Henry Wright replied to the topic Notifications in the forum How-to & Troubleshooting 7 years, 4 months ago
I’m not sure there is something available. Try searching through the list of plugins at wordpress.org
-
Henry Wright replied to the topic Notifications in the forum How-to & Troubleshooting 7 years, 4 months ago
This functionality isn’t in core so you would need to install a plugin or write some custom code to get this done.
-
Henry Wright replied to the topic Warning After Install of Multisite Shared Menus in the forum How-to & Troubleshooting 7 years, 4 months ago
You could try opening an issue here:
-
Henry Wright replied to the topic Warning After Install of Multisite Shared Menus in the forum How-to & Troubleshooting 7 years, 4 months ago
It might be worth messaging the Multisite Shared Menu author. If the plugin is causing PHP notices then likely the author will want to clean those up.
-
Henry Wright replied to the topic admin-ajax.php Failed to load resource in the forum How-to & Troubleshooting 7 years, 4 months ago
Have you restricted access to the admin area in any way? Stuff like the following would cause the admin-ajax.php resource to be inaccessible.
if ( is_admin() ) {
// Restrict access
} -
Henry Wright replied to the topic Warning After Install of Multisite Shared Menus in the forum How-to & Troubleshooting 7 years, 4 months ago
In the code snippet I posted, try replacing
init
withwp
. If that doesn’t work then the problem would need some debugging. -
Henry Wright replied to the topic Warning After Install of Multisite Shared Menus in the forum How-to & Troubleshooting 7 years, 4 months ago
I hadn’t actually tested so it may be that the snippet doesn’t work. bp-custom.php is where it should go. You could try hooking to
wp
instead ofinit
. -
Henry Wright replied to the topic Warning After Install of Multisite Shared Menus in the forum How-to & Troubleshooting 7 years, 4 months ago
The warning is referring to a line in
bp_core_menu_highlight_parent_page()
. The function adds CSS classes to the page. This is hackish but you could try this until you find a better solution.add_action( 'init', function() {
remove_filter( 'page_css_class', 'bp_core_menu_highlight_parent_page', 10, 2 );
} );Also you shouldn’t have
WP_DEBUG…
[Read more] -
Henry Wright replied to the topic How to position profile fields within members directory in the forum Creating & Extending 7 years, 4 months ago
In your template, there will be a line of code
do_action( 'bp_directory_members_item' );
.This is what your
add_pf_to_members_page()
function hooks to so the output of your function will appear at that exact point in the template. If you want to move the output you’ll need to move thedo_action()
call or hook to another action.Hope this helps.
- Load More
@henrywright
Active 8 months, 1 week ago