Search Results for 'theme'
-
AuthorSearch Results
-
November 15, 2011 at 10:35 pm #124487
In reply to: [Resolved] Steps for theme compatibility not working
@mercime
ParticipantCool, glad it worked out for you

Method 1 works all the time for all WP themes, while method 2 works for some WP themes depending on HTML structure.
Method 2 in short, uses the WP functions available for themes. Look at /activity/index.php and you’ll see header(‘buddypress’), sidebar(‘buddypress’) and footer(‘buddypress’) in the template files. If there’s a header-buddypress.php, in the WP/BP theme folder, then the BP template file would use header-buddypress.php. If there’s none, then the BP template file would use header.php by default.
TMA works with either method 1 or method 2. I gave the solution for method 2 because the HTML structure of TMA was suitable for that. Method 2 saves you from having to “fix alignment” for 16 BP template files again (which you have to do in method 1) when the BP Template Pack plugin is upgraded.
November 15, 2011 at 8:53 pm #124480In reply to: How to edit the Buddypress default theme navigation?
dude
Memberthe mobile menu is just for the mobile version of the site via the buddypress mobile plugin
I don’t want the mobile menu being ‘hidden’ from logged-out mobile users really, mainly desktop users.I’ve put some mods in the activity-loop etc for keeping activity updates, profiles and members, groups, and forum directories ‘garden-walled’ as such so may have that angle covered?
November 15, 2011 at 8:28 pm #124479In reply to: How to edit the Buddypress default theme navigation?
aces
ParticipantI’m not sure what you mean – but according to https://codex.wordpress.org/Function_Reference/wp_nav_menu you could have ` ‘fallback_cb’ => false,`
I don’t know how you are doing the mobile menu, but couldn’t you just have $current_user logged in and out mobile menus?
If someone can guess the page such as activity, then just hiding the menu won’t stop them getting in anyway.
November 15, 2011 at 8:14 pm #124478In reply to: How to edit the Buddypress default theme navigation?
dude
Member@aces just had a thought! instead of calling up the ‘secondary-menu’ would it be possible to void out / null the request to fallback on no menu at all..?
i.e. – => false, ‘menu_id’ => ‘nav’, ‘theme_location’ => ‘no-menu’, ‘fallback_cb’ => ” ) );
or – => false, ‘menu_id’ => ‘nav’, ‘theme_location’ => ‘//’, ‘fallback_cb’ => ” ) );
November 15, 2011 at 7:00 pm #124473In reply to: How to edit the Buddypress default theme navigation?
dude
Membersingle menu..?
I really think I gotta create the third theme location first, because the fall-back call will end up showing logged-out visitors my mobile menu which is a duplicate of the primary location so in theory my menu tabs will still be on display
November 15, 2011 at 6:39 pm #124471In reply to: Buddypress when I don’t want Buddypress
3dperuna
ParticipantFigured it out… incompatible plugin (Theme-My-Profile, for what it’s worth). Deactivated it and the world returned to normal*.
* Realize that “normal” is a relative term.
November 15, 2011 at 5:51 pm #124468In reply to: [Resolved] Steps for theme compatibility not working
jugularbean
Participant@mercime – great! it worked. Thanks a ton. Still some styling to do, but it’s working yay!
Could you however help clarify why method 2 worked over 1. And how does method 2 work exactly?
November 15, 2011 at 5:36 pm #124467In reply to: [Resolved] Steps for theme compatibility not working
@mercime
Participant@jugularbean Re #1 – thanks for clarifying, just had to make sure

2. You don’t change the filenames, you replicate the file/s and rename as header-buddypress.php etc and should be saved in root of your TMA theme folder.You’re in luck. We can use the second method to make TMA compatible with BuddyPress.
1. Open up TMA’s header.php with text editor and Save As > header-buddypress.php in TMA theme folder
2. Open up header-buddypress.php and add the following at the very end of the file:
`<?php global $woo_options;
//get_template_part( ‘top-banner’ );
?>`Save file.
Note: if the global woo_options wreaks havoc, delete from the code
3. Open up TMA’s sidebar.php and Save As > sidebar-buddypress.php in TMA’s theme folder
4. Open up sidebar-buddypress.php
a. At the very beginning of the file, insert
``
b. At the very end of the same file, insert
``
Save file.
5. You might want to tweak the default styling of the BP template files. You can use the following style changes used in Twenty Ten theme as a guide https://codex.buddypress.org/theme-development/theme-dev-bp-template-pack-walkthrough-twenty-ten-bp-1-5/3/
November 15, 2011 at 3:07 pm #124455In reply to: Cannot assign pages components
johnegg
ParticipantOk something very strange going on. I did a fresh install of wordpress & deleted tables in database. Went in to WP admin and all ok. Went to ‘Settings – reading’ and I can see that I can select homepage & blog page using dropdown.
However as soon as I activate buddypress and go back in to ‘Settings – reading’ the dropdown to select static homepage is no longer there! This is obviously related to my above problem with no page dropdowns within buddypress settings.
Also any pages I create are not showing up in my themes navigation menu. Its as if WP is not reading any pages I create and treats it as if I have no pages.
If I deactivate buddypress the problems persists and i need to delete database again.
Please can anyone help with this?
November 15, 2011 at 10:35 am #124446In reply to: [Resolved] Steps for theme compatibility not working
jugularbean
ParticipantTMA files
page.php http://pastebin.com/p4mekV4w
header.php http://pastebin.com/RyYnvDs6
footer.php http://pastebin.com/tcVvrbSjNovember 15, 2011 at 10:30 am #124445In reply to: [Resolved] Steps for theme compatibility not working
jugularbean
Participant1. Yes the theme was already activated when I installed and activated the BP template pack and ran the BP Compatibility.
2. I’ve been trying to use the first method without much success. To be honest I didn’t understand the 2nd method. After I change the filenames where do I save the new files (header-buddypress.php etc)?November 15, 2011 at 7:00 am #124433In reply to: Buddypress when I don’t want Buddypress
Paul Wong-Gibbs
KeymasterYou must have another plugin, or theme option, affecting it.
November 15, 2011 at 3:36 am #124428In reply to: How to edit the Buddypress default theme navigation?
aces
ParticipantI’ve just tried the following on a bp test site instead of the single menu and it worked
`
<?php
if ( is_user_logged_in() ) {
wp_nav_menu( array( ‘container’ => false, ‘menu_id’ => ‘nav’, ‘theme_location’ => ‘primary’, ‘fallback_cb’ => ” ) );
} else {
wp_nav_menu( array( ‘container’ => false, ‘menu_id’ => ‘nav’, ‘theme_location’ => ‘secondary-menu’, ‘fallback_cb’ => ” ) );
}
?>
`nb: The test site is also using the walled garden technique…
November 15, 2011 at 3:30 am #124427In reply to: How to edit the Buddypress default theme navigation?
dude
Memberjust realized I’ll have to make up a third theme location to pull this one off
when does the editing ever end lolNovember 15, 2011 at 3:17 am #124426In reply to: How to edit the Buddypress default theme navigation?
dude
Membergood point !
can’t afford any more site breaks on a flourishing communityI take it my initial plan A is not worth pursuing then?
It does address both menus specifically speaking..
November 15, 2011 at 3:11 am #124425In reply to: How to edit the Buddypress default theme navigation?
aces
ParticipantIt would help if you had a test site to try it out on, ie: localhost or a subdomain…
November 15, 2011 at 3:01 am #124424In reply to: How to edit the Buddypress default theme navigation?
dude
Membercustomized bp-columns? sounds interesting !
does the fact that I have the secondary navigation as the mobile version of the site make any difference? just got this gut feeling that this may just fail unless I call the secondary the logged-out-menu as my theme at present only supports 2 menus.
November 15, 2011 at 2:57 am #124423In reply to: How to edit the Buddypress default theme navigation?
aces
ParticipantI’m using a customised bp-columns, which is mostly the same as bp-default.
I would just replace
`wp_nav_menu( array( ‘container’ => false, ‘menu_id’ => ‘nav’, ‘theme_location’ => ‘primary’, ‘fallback_cb’ => ‘bp_dtheme_main_nav’ ) );`
which begins and ends with php tags with the above also wrapped in php tags….the mobile angle is something else…
November 15, 2011 at 2:54 am #124422In reply to: How to edit the Buddypress default theme navigation?
dude
Memberok gonna give it a try (fingers crossed)
I’ll pop it in my child themes header.php (bp default 1.5.1)
any particular nesting point..?
November 15, 2011 at 2:51 am #124421In reply to: How to edit the Buddypress default theme navigation?
aces
ParticipantActually I think it should, but I didn’t try it as I was already experimenting with the above for a non bp site and tried it out on a bp test site and it worked.
I quite like this approach because you could also use the data (see link) to do other things as well…..
November 15, 2011 at 2:42 am #124419In reply to: How to edit the Buddypress default theme navigation?
dude
Memberhi @aces !
thanks for the alternative option
does your post imply that the example I’m trying to use will NOT work then.?
by the way I have 3 menus in place:
primary navigation – logged-in-menu
mobile menu – mobile (buddypress mobile)
logged-out-menu
November 15, 2011 at 1:54 am #124413In reply to: How to edit the Buddypress default theme navigation?
aces
ParticipantHow about the following (in the header?) instead of what’s there (bp 1.5.1)
`// https://codex.wordpress.org/Function_Reference/wp_get_current_user
$current_user = wp_get_current_user();
if ( 0 == $current_user->ID ) {
wp_nav_menu( array( ‘container’ => false, ‘menu_id’ => ‘nav’, ‘theme_location’ => ‘secondary-menu’, ‘fallback_cb’ => ” ) );
// Not logged in.
} else {
wp_nav_menu( array( ‘container’ => false, ‘menu_id’ => ‘nav’, ‘theme_location’ => ‘primary’, ‘fallback_cb’ => ” ) );
// Logged in.
}
`
? (wrapped in “ tags)November 15, 2011 at 1:15 am #124412In reply to: How to edit the Buddypress default theme navigation?
dude
Memberokay so I’ve done some digging and found – nav-menu.php
copied it to my child themes folder and created two seperate menus in my admin dashboard.I found this code for the menu config: here: https://codex.wordpress.org/Function_Reference/wp_nav_menu
`<?php
if ( is_user_logged_in() ) {
wp_nav_menu( array( ‘theme_location’ => ‘logged-in-menu’ ) );
} else {
wp_nav_menu( array( ‘theme_location’ => ‘logged-out-menu’ ) );
}
?>`
Am I getting warm..?If so, just two questions remain..
a) where in: nav-menu.php do I add the above code..?
b) Does the above code need to be wrapped at all..?
Kind regards in advance
November 15, 2011 at 12:18 am #124408@mercime
Participant`’menu_id’ => ‘nav’, ‘theme_location’ => ‘primary’, ‘fallback_cb’ => ‘bp_dtheme_main_nav’ ` pertains to the adoption of the wp_nav_menu function which allows users to create their own menu. This falls back to wp_page_menu and bp_nav_menu.
https://codex.buddypress.org/extending-buddypress/how-to-set-up-your-main-site-navigation-using-the-built-in-wordpress-menus/November 14, 2011 at 11:10 pm #124405In reply to: Where are my sub-menus? – Graphene Theme
junglejinge
MemberI have followed these instructions in modifying the stylesheet (style.css) but despite this, the results are still the same. http://www.meetinbradford.org/groups/x/
-
AuthorSearch Results