Home › Forums › Support › Rendering BuddyPress pages with special layouts › Reply To: Rendering BuddyPress pages with special layouts
I looked at the code, Tom, but while I didn’t try it out, on the surface it doesn’t appear to achieve the requirement I have. Perhaps I wasn’t quite clear in explaining the execution context of this situation, so let me try again…
My BuddyPress-controlled Registration page is part of a website that is seriously restricted from access by non-logged-in users. The page is a simple rendering of the usual BP registration form, but no artifacts of the restricted content are to be rendered. That means:
- No site-wide default header
- No menus or navigation components whatsoever
The BuddyPress Registration page is not a normal page (or post) in the sense we’re used to — it does not exist as an item in the “Pages” list, nor the “Post” list, so I can’t use GP’s great features to apply the necessary characteristics to achieve my goals. BuddyPress “catches” the URI (“register”) used to render the page, and then applies its template hierarchy rules to derive which template will be used to drive the construction of the page.
While there are a number of ways to create a tempalate that BP can find, I have elected to use the “index-register.php” template, as documented in BP’s hierarchy documentation. And, as I mentioned earlier, I manage the location of that file in the BP theme-compatible tree within my child theme at:
/wp-content/themes/generatepress-child/buddypress/members/index-register.php
In my specialized index-register.php file (which was cloned from GP’s page.php), it appears I need to execute get_header() (in all of its bloody glory, complete with no fewer than 8 action hooks) in order to get the page CSS files enqueued so the rest of the page renders properly.
As it turns out, I may have been trying to pound a square peg into a round hole with regard to getting the equivalent of a Page Header Image into the top of the page. Since I have full control over the custom template, I can simply craft the necessary HTML directly into the template. I have made that change, and it works fine, so I am almost there. Almost.
Naively, I assumed that if I simply commented-out the call to get_header() that everything would be fine. Yeah, pretty naive, for sure. There was no CSS applied to the primary content area (where the text and registration form reside).
Apparently, at least *some* of the functionality of get_header() must be performed in order for the enqueuing of the CSS files. So this task is all that’s left for me to accomplish in order to meet my goals.
So it comes down to this: What is the best way to effect the enqueuing of the necessary CSS files so that the primary content area (the div#primary container) is rendered with the theme-based CSS stylings?
Thanks for your patience and support. 😉