BuddyBoss Home – Web › Support Forums › Themes › Boss. theme › sugg: better page display
- This topic has 21 replies, 8 contibutors, and was last updated 9 years, 1 months ago by Anonymous.
Question
May 11, 2015 at 5:31 pm #40064@jeanpierreHi, as you do not really have a design forum, i post this here.
i wanted to have a better “page” display, mostly like we see articles/posts display, with featured image and structure…
so i activated the excerpt in pages, and modified the page.php and content-page.php files to fit my interests…
here are the examples… your version VS my version…
sure i can provide the work, if requested by the guys up there…
Answers
May 11, 2015 at 6:30 pm #40078@sauntvalerianx
May 11, 2015 at 6:30 pm #40079@sauntvalerian@jeanpierre – would you be willing to share your changes to those files in pastebin?
What happens in the header if you don’t set a featured image for the page?
What you’ve done is really beautiful and even fits thematically in with a lot of the layouts done for the BuddyPress profile and group pages. Well done!
May 11, 2015 at 8:18 pm #40083@jeanpierreif we don’t choose a featured image, the script act as before.
if we don’t write an excerpt, the script act as before…i’m not using pastebin or any SVN, i’m not into these geek things. i’ll see what can be done with the guys above…
May 12, 2015 at 12:19 am #40084@antonkawasakiI actually customized my own site’s regular pages just like this! I didn’t mess with any of the php pages, though, and did it entirely in CSS instead for each and every page. Although it’s much smarter to do it @jeanpierre’s way and have it readily available for any new page, so I’d be interested in the code as well…
May 12, 2015 at 2:43 am #40088@jeanpierre… what i did can not be done via CSS, @antonkawasaki … that’s why it requires code edition…
the changes i made were for the whole package of “pages”, but i will be able to provide a single template you can select for each page, like you can see here: https://codex.wordpress.org/Page_Templates .. it only requires that the page i generated is uploaded in your theme *(child is prefered)…
May 12, 2015 at 12:24 pm #40111@jeanpierreOk, so here it goes, the “nex_Custom Page Complete” template you can use in any of your pages, just for the fun of having a different display.
you can put that file in your main theme or the child of your choice, no problem as it does not override anything.
May 12, 2015 at 11:30 pm #40134@rugwarriorThank you for sharing ☺
May 13, 2015 at 2:46 am #40135@
AnonymousThanks @jeanpierre
May 13, 2015 at 4:14 am #40138@jeanpierrei forgot to mention that to activate the Excerpt on pages, you have to add a line in the “functions.php” file in your theme;
*********
if you use the Main Boss Theme, you have to find the file /boss/buddyboss-inc/theme-functions.php
Find *(line 29):
load_theme_textdomain( ‘boss’, get_template_directory() . ‘/languages’ );Insert Below:
add_post_type_support( ‘page’, ‘excerpt’ );*********
If you use a child theme, find the file /boss-child/functions.php
Find *(line 22):
load_theme_textdomain( ‘boss’, get_template_directory() . ‘/languages’ );Insert Below:
add_post_type_support( ‘page’, ‘excerpt’ );*********
that’s it, you’re done… now when editing a PAGE, you will have the Exceprt field below the editor.
if strongly suggest the usage of this plugin: https://wordpress.org/plugins/rich-text-excerpts/ to add style in your excerpts…
May 13, 2015 at 10:10 am #40154@antonkawasakiThis is great, @jeanpierre – thanks for sharing!
Two things:
1). What if we want a sidebar on that template page? Is there a way to activate that?
2). When I use this template, the title of the page appears twice — in the header image, and again right before the content. Is that normal?Thanks for doing cool experimentation tweaks – I love stuff like this!
May 13, 2015 at 12:51 pm #40157@jeanpierrehum, actually i mistyped the file when copy/pasted it to this template… #2 is not supposed to occur… will repush it later this evening.
#1 sidebars were not edited. but as i plan on giving my site a choice of sidebars for each page, depending on the need, i’ll add a tweak to be able to choose among other sidebars…
May 16, 2015 at 2:55 am #40282@ubrandonThis is really awesome and exactly what I was looking to make myself, thank you! What is the first line of code about woocommerce?
Also, I simply commented out the following code to take away the second title.
<?php
if ( !has_excerpt( $post->ID ) ) {
?>
<header class=”entry-header <?php if(is_search()){ echo ‘page-header’; }?>”>
<?php
the_title();
?></h1>
</header>
<?php
}
?>May 16, 2015 at 1:46 pm #40295@jeanpierreif you edited the page, @ubrandon , you know that it’s a clone of the original page.php… so the content with WooCommerce is there by default… you can still use this template to display your woocommerce pages with style.
and sure you can edit everything, this is just an example… the code was specific for my usage and i provide it in case someone want the same..
July 31, 2015 at 1:52 pm #43657@jeanpierreOk, here’s an update… i transformed this tweak into a plugin that i will enhance when i find more ways to change the display of pages in Boss.
so if you followed this thread, drop everything that you edited… though it’s supposed to be done if you updated your script.
then you upload this plugin, everything is in it… just activate it, and you will see more Page Templates in your Page editor… as you can see in the screenshots.
1- without any change, a plain and boring page
3- with the featured image AND a excerpt you can add in the page editor – activated with this plugin, but by default in WP anyway.
4- the editor where you see how… 🙂
- The question ‘sugg: better page display’ is closed to new replies.