What this means is if you are on a BuddyPress page, BuddyPress will look for a specific template file in your theme and use that template to inject its contents into. Most of the time BP will use page. However, if you wanted to style BuddyPress pages differently than a regular WordPress page, you could add a template file named buddypress. See also: a-quick-look-attheme-compatibility for an introduction to theme compatibility and how to overload the templates to your child theme.
We will use the following URL as an example — example. Since version 2. It also highlighted a bug in my patch, which also supported a custom home. For these main templates need a better name , we should complete Ray's patch, and get it into core, as a first pass. A second step can be to introduce a hierarchy for templates included inside one of the main templates, giving people more granular control over specific template parts rather than the entire page template. Ray, I've ray. Or whatever setup you think is better :.
I'll merge the patch and start to have a good play around and see how things feel Saturday morning and the more feedback and testing the better on this one. This will be nice to have as well. I think we should nail down a filenaming convention before we start this second step because as you said, this can get confusing fast! As nice as it would be to have granularity is it so vital where inner templates are concerned? If I have been able to do, say, home-special-group.
I actually like having inner template granularity. It's very useful from a theme designer view point. For activity permalink, perhaps only do user checks and omit activity types. But in that case, it would presumably be only for the template parts related to displaying a single item in the directory that we would need to know what group we're looking at.
I'd rather rework BP's load order so that it works more like WP's custom post type queries. This will be hard, of course. I did this in my patch because we're not in the template loop. This would help with template hierarchy, and it would also more closely match the way that the members and group components work. I'm agnostic about whether this should be done for 1. IMO it's not out of the question to release 1.
Paul, in ray. First, I've moved custom templates under a subdirectory called "custom". This is so you can easily keep track and tell what overrides you've made in your theme. The second change is the prefixing of the template with the parameter. This is a no-no and I'm surprised that this isn't really addressed in WordPress ' own template hierarchies!
I've also added in a component check for the members component because some theme devs might want to style certain components differently such as messages or settings. I feel the same way; it would be nice to address this in 1. Replying to boonebgorges :. However what I still don't see - and really the intial point of this exercise - is how one overloads for all user account screens, we have drilled down past this point.
Tests fine. I like it. Works for me. Perhaps the naming of the directory ought to reflect what is being overloaded for added clarity i. Ray: I've added ray. If you could confirm this, and sanity check it before commit, that would be wonderful.
You can override home. Replying to DJPaul :. Paul I'm not seeing how then I override home. If I implement a home. The settings templates are actually named that way because of a bug. See Paul: With what we talked about last week, I spent some time testing everything again except group extensions.
It won't load the skeleton template from page. The problem is we're referring to home. Both as a regular page template and a template part. For template hierarchy, we should use index. This is confusing, but partly as clarity is perhaps not forthcomming on the way devs are meant to approach templating moving forward.
See also: WordPress. Hello BP Community, I am interested in creating a custom member profile page so I can have the freedom to add each custom field in a specific location within the template. Thank you, James. Viewing 9 replies - 1 through 9 of 9 total. Jayell12 Participant. Hi vapvarun , That URL just shows the front-end profile page.
In your child theme you would then have all your custom BP templates this way updating WP will not overwrite any changes you have made. This has been a basic guide to familiarise you with the new template files and how you can make them work for you in your chosen theme and more advanced options exist.
As of BP 1. You can read a more detailed breakdown and explanation of this new template hierarchy on this page: Enhanced template-hierarchy in BP 1. More on BuddyPress 1.
0コメント