The skeleton component is just an example and can be outdated at times. It’s not something you take and then edit to create a new component. From what you posted it would be hard to tell what is wrong.
Did the skeleton plugin work when you first activated it?
This seems to be a problem with how the skeleton component setup is handling the loading of screens:
bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
tries to load a template file within the plugin folder – not (as I think it’s meant to) from the standard BP template folder, or the current themes’ buddypress template (if overridden).
@modemlooper, any idea how to get the screen page to display in the standard wordpress/buddypress template system, or why it’s not working?
It’s not something you take and then edit to create a new component.
It certainly reads like something you take and edit to create a new component!
Ok, so it’s pretty easy if you’re not familiar to buddypress (as I am) to make bad assumptions here. (as I am, and did)
@thecutter
Your first problem is that in the example, the code is looking for a screen template (plugins.php) in this case that’s not in your template directory. It won’t look for or use any templates in the standard buddypress templates folder (as I assumed) and so you will need to make sure that any templates needed are within the [plugin]templates/[pathtotemplate] path.
I also assumed that any of these pages would automatically assume the standard buddypress layout and page template, using the supplied template as the content for the page – which was a mistake. What gets served is a vanilla page, using the standard wp header and footer tags (well, if you use the screen-one.php as a template).
If you want the buddypress profile header add
<?php locate_template( array( 'buddypress/members/single/member-header.php' ), true ) ?>
to your template. You can do this for all of the items on your standard bp page, have a look through the other templates in bp as a guide.
This is not a bad thing, and you can do this stays completely flexible when combined with the standard wp templating. When overriding bp component templates remember to put the [templatepath] file into your theme templates folder, not the theme templates/buddypress folder.
For example, my ‘Achievements’ summary template (‘achievements/screen-summary’) goes into ‘achievements/screen-summary.php’ in my theme’s template folder.
Hope this helps, I was confused for a while, but it’s all good now 😉
After playing, I think
<?php bp_get_template_part( 'members/single/member-header' ); ?>
maybe better than what I suggested above.
i want to load member-header.php file in certain template file for my customization but it does not load.so help me asap…
how can i load member-header.php file’s code in certain template file and template file is in page-templates folder .is this possible? plz ans me asap