-
Author
Tagged: buddypress, templates
-
June 15, 2015 at 01:40 #62749PatagoniaParticipant
Hi, my BP sub pages use the template I chose in theme settings > buddypress.
But the BP main pages (members, activity etc) do not. Tthey seem to use the standard Page.php template, which I edited (but those edits don’t make sense for BP and give errors).How can I make/choose one overall template for the BP main pages?
cheers
June 15, 2015 at 18:29 #62914LauraModeratorHello, do you want to show the bp sidebar in members and activity page? If so, i can guide you so you can do the changes in child theme 🙂
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
June 17, 2015 at 00:14 #63302PatagoniaParticipantHi Laura,
no, what I want to do is make a page template with some extra code within the loop (underneath the featured image).
It seems that the only way to do this is to make a whole new page type, as the page templates do not cover the main part; if I change content-page.php, then all pages (including the mentioned BP ones) have the change, which is what I don’t want.
So now I have solved it by creating a new template which calls a new content type: content-edited-page.php, not sure if this is the way to go. Just a bit different code should not warrant a new content-type?
Cheers
June 17, 2015 at 00:30 #63316sharmstrModeratorWhy can’t you use !bp_is_blog_page()?
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
June 17, 2015 at 01:59 #63336PatagoniaParticipantWhy can’t you use !bp_is_blog_page()?
I don’t know because I do not know what you mean with that 🙂
June 17, 2015 at 02:18 #63337sharmstrModeratorLOL. Sorry.
So you’re saying that you want to add something to buddypress pages only, but dont want to create a separate template file for it, right?
bp_is_blog_page() is a bp function that will tell you if you are on a page that ISNT a bp page. So, if you add an ! to it, you’re asking “Is this a bp page?”
In your page.php file you can do this
COPY CODEif (!bp_is_blog_page()) { echo "Hey! I'm a buddypress page"; }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
June 17, 2015 at 02:19 #63338sharmstrModeratorLots of other goodness here: https://codex.buddypress.org/developer/template-tag-reference/
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
June 17, 2015 at 04:10 #63347PatagoniaParticipantAh, ok, yes that might work. I am ok with making more templates, but the problem is I want to edit the part that is not covered by the templates. There is no template that goes between general-before-wrap & general-after-wrap I think.
So the only choice is to make a complete new page type like content-edited.php in the child theme root, and a real new template which then calls
get_template_part( 'content', 'edited' );
which calls new page parts. Just seems a bit impractical and was a big puzzle for me.This also mean I cannot set this as a default template as far as I can see.
June 17, 2015 at 13:20 #63393sharmstrModeratorThere’s a couple of ways to do this. You can do it as I’ve already outlined, or you might be able to inject it using a function in your childs function file. Tell me exactly where you want it and on what pages.
BTW – there are several templates that go between general-before-wrap & general-after-wrap. It all depends on the page you’re viewing. Again, let me know where you want the new content.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.