Can I create template parts instead of full page?
-
Hi,
I have created a buddypress.php file in root of my theme to setup general page and sidebar. This template uses
the_content()
so all the normal buddypress stuff loads up.I want to now offer my own files for the various template parts but I am doing something wrong.
For instance, if I add this template part:
my-theme/buddypress/members/single/index-component-profile.php
it does not load it as a template part, it loads it as a full page template.I don’t want to create full template for every component, I want to make buddypress use the template parts.
In the default theme inside plugin folder this is how it seems to work. Can I do it like this or do I have to use filters or something? The main plugin uses
locate_template()
to load all of these so I guess it’s possible, I am just not sure of the easiest/best way.How do I just build my templates for various sections?
Thanks
- The topic ‘Can I create template parts instead of full page?’ is closed to new replies.