Forum Replies Created
-
Thanks so much … this is making more and more sense. One question, though – what would be the best way to place such a condition into the template (while keeping as much of the parent template intact as possible and avoiding tedious file-by-file manipulation)?
Could I, for example, place this sort of condition atop the normal header.php file, moving all the normal header HTML markup into the final else condition and removing the get_header(); call? Would this make sense:
<?php if ( bp_is_user_profile() ) {
include (TEMPLATEPATH . '/profileHeader.php'); //include this header on profile pages
} elseif ( other_conditions() ) {
include (TEMPLATEPATH . '/otherHeader.php'); //include this header on profile pages
} else {
include (TEMPLATEPATH . '/homeHeader.php'); //include normal header markup placed into homeHeader.php
} : ?>Would that code work? Does it need an endif? Not sure if the closure of it is correct either, what with the colon and all. Regardless, once the syntax is corrected, it seems like an easy thing to maintain, since it would only involve changing the header.php, then creating whatever other headers I might need. Then every time wordpress looked at header.php it would decide which header markup to include. Is that a correct assessment?
Is there some more efficient implementation of this type of conditional statement I’m not thinking of?
Thanks again for all your help, Travel-junkie!
Okay, just looked at the conditional tags in the BP Codex. I could place a conditional statement in the header asking if various conditions are present, such as bp_is_directory(), or bp_is_user_profile() etc, then relevant code?
I’m not sure how to,
code a little switcher that works with includes.
Is there someplace I can go to get the gist of this? Should I just search the WP codex for “includes”?
Also, what attribute can I use to differentiate one file from another when using if statements?
In reply to: Custom Theming QuestionsAlright, this is starting to congeal. Only thing is, I”m about 80% confident with what you’re saying regarding the creation of actions in the functions.php file and those actions hooking into a do_action call in the parent theme.
2 questions:
1) If I create an action in the child functions.php that does not exist in the various templates of the parent theme, is it better practice to fiddle with the template file(s) of the parent theme, adding the do_action call there, or to move the template file to the child theme before making any changes?
2) Do you or anyone else have any suggestions for references a semi-savvy-newbie might use to gain a more complete understanding of how to write actions in the functions.php file? I assume there’s some fairly complete documentation in the wordpress codex, but perhaps there’s a link or two to some nice tutorial-type blog entries? I probably need to spend some more time with PHP coding anyway

Thanks everybody.
In reply to: Custom Theming QuestionsSecondarily, regarding the actions in BuddyPress, what are the effects of leaving out an action that is found in the default theme? Say, for example, leaving out:
<?php do_action( 'bp_before_search_login_bar' ) ?>and then
<?php do_action( 'bp_after_search_login_bar' ) ?>Finally is there some reliable documentation detailing what these actions actually do within the theme/template/plugin?
Thanks again!
In reply to: Custom Theming QuestionsThanks so much for the reply, travel-junkie! Very helpful. One question, though:
You said:
The best way to start with a theme for BP is to start off with the bp-default theme. Then copy files across from the bp-sn-parent theme if you need to modify a file. If not, then you can leave that file in bp-sn-parent, cause WP will get that automatically for you.From what I’ve read about parent/child relationships, the only files that are functional in child themes are style.css and functions.php. Has this changed in 2.8? Am I able to override parent template files by placing a revised template file in my child theme’s directory?
Hey all. I have just been hired full time as a web developer and videographer for a major medical school. The idea is to create a site that will recruit more young people to go into healthcare related fields.
Anyway, I want to use WPMU and Buddypress as the architecture for content management and some social networking components. I have a good bit of WordPress experience, but am completely new to BuddyPress. I am right now in the process of developing a totally custom theme for the site.
There is a lot of content outside just the main blog and the BuddyPress components. The wordpress functionality is basically complete and I’m now starting on the BuddyPress portion. I’m a bit confused as to how to step into the theme development. Is there a good explainer somewhere that might help me understand how exactly the BP components are called or hooked into what would otherwise be a standard WP theme?
I would not be able to share the custom build with the community as it would not have any applicability outside this site, but once I get my feet wet, I would be happy to help develop a more generic theme to donate to the cause.