-
AuthorPosts
-
May 28, 2015 at 2:31 am #284109
Hi, I noticed that I am able to remove the Blog header section “Title and Subtitle” through the customizer, but I would like to be able to add styling/custom header to the blog index page via the visual composer. Basically just want consistency through the whole site, and currently the Blog page looks completely different to the rest of the headers on the other pages.
Pls see examples below:
http://cinnabar.co.za/downloads/header-sample.png – The header I want to impiment (Done via Visual Composer)
http://cinnabar.co.za/downloads/blog.png – Current blog headerMay 28, 2015 at 7:51 am #284396Hi Shaun,
Can you provide us your site url.
These domains are quite different from your screenshots.
http://www.bloy.co.za/
http://cinnabar.co.zaThanks
May 29, 2015 at 5:31 am #285709Sorry, unfortunately the domain is on a test server and you would need to change your host file to view it:
197.96.136.174 bloy.co.zaMay 29, 2015 at 8:05 pm #286336Hi There,
Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices. Then on the child theme’s \framework\views\integrity directory create a file named _landmark-header.php and paste the code below:
<?php // ============================================================================= // VIEWS/INTEGRITY/_LANDMARK-HEADER.PHP // ----------------------------------------------------------------------------- // Handles content output of large headers for key pages such as the blog or // search results. // ============================================================================= $disable_page_title = get_post_meta( get_the_ID(), '_x_entry_disable_page_title', true ); $disable_filters = get_post_meta( get_the_ID(), '_x_portfolio_disable_filtering', true ); ?> <?php if ( is_home() && x_get_option( 'x_integrity_blog_header_enable', '1' ) == '1' ) : ?> <header class="x-header-landmark x-container max width custom-landmark-container"> <div class="custom-landmark x-container max width">Blog / News</div> <!-- <h1 class="h-landmark"><span><?php echo x_get_option( 'x_integrity_blog_title' ); ?></span></h1> <p class="p-landmark-sub"><span><?php echo x_get_option( 'x_integrity_blog_subtitle' ); ?></span></p> --> </header> <?php elseif ( is_search() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Search Results', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "Below you'll see everything we could locate for your search of ", '__x__' ); echo '<strong>“'; the_search_query(); echo '”</strong>'; ?></span></p> </header> <?php elseif ( is_category() || x_is_portfolio_category() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Category Archive', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been categorized as ", '__x__' ) . '<strong>“' . single_cat_title( '', false ) . '”</strong>'; ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title ?></span></h1> <p class="p-landmark-sub"><span><?php echo $subtitle ?></span></p> </header> <?php elseif ( x_is_product_category() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Category Archive', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all items that have been categorized as ", '__x__' ) . '<strong>“' . single_cat_title( '', false ) . '”</strong>'; ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title ?></span></h1> <p class="p-landmark-sub"><span><?php echo $subtitle ?></span></p> </header> <?php elseif ( is_tag() || x_is_portfolio_tag() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Tag Archive', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been tagged as ", '__x__' ) . '<strong>“' . single_tag_title( '', false ) . '”</strong>'; ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title; ?></span></h1> <p class="p-landmark-sub"><span><?php echo $subtitle; ?></span></p> </header> <?php elseif ( x_is_product_tag() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Tag Archive', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all items that have been tagged as ", '__x__' ) . '<strong>“' . single_tag_title( '', false ) . '”</strong>'; ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title; ?></span></h1> <p class="p-landmark-sub"><span><?php echo $subtitle; ?></span></p> </header> <?php elseif ( is_404() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Oops!', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "You blew up the Internet. ", '__x__' ); ?></span></p> </header> <?php elseif ( is_year() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Year', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'Y' ); echo '</strong>'; ?></span></p> </header> <?php elseif ( is_month() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Month', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'F, Y' ); echo '</strong>'; ?></span></p> </header> <?php elseif ( is_day() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Day', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'F j, Y' ); echo '</strong>'; ?></span></p> </header> <?php elseif ( x_is_portfolio() ) : ?> <?php if ( $disable_page_title != 'on' || $disable_filters != 'on' ) : ?> <header class="x-header-landmark x-container max width"> <?php if ( $disable_page_title != 'on' ) : ?> <h1 class="h-landmark"><span><?php the_title(); ?></span></h1> <?php endif; ?> <?php x_portfolio_filters(); ?> </header> <?php endif; ?> <?php elseif ( x_is_shop() && x_get_option( 'x_integrity_shop_header_enable', '1' ) == '1' ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo x_get_option( 'x_integrity_shop_title' ); ?></span></h1> <p class="p-landmark-sub"><span><?php echo x_get_option( 'x_integrity_shop_subtitle' ); ?></span></p> </header> <?php elseif ( x_is_buddypress() ) : ?> <?php if ( x_buddypress_is_component_with_landmark_header() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo x_buddypress_get_the_title(); ?></span></h1> <p class="p-landmark-sub"><span><?php echo x_buddypress_get_the_subtitle(); ?></span></p> </header> <?php endif; ?> <?php endif; ?>
Then add this on your custom css in the customizer
.x-container.max.custom-landmark-container { background-color: #005c81; padding-top: 25px; padding-bottom: 25px; font-size: 30px; color: #ffffff; margin-top: 0; text-align: left; width: 100%; max-width: 100%; }
Hope it helps, Cheers!
June 4, 2015 at 8:03 pm #293012Hi,
I have followed this and managed to get it to work, however I am still having problems getting the header to look exactly like the rest on my other pages.
Blog page : http://www.mode500.com/blogged
Other page header example : http://www.mode500.com/contact
Thank you 🙂
June 4, 2015 at 8:06 pm #293016I am sorry I forgot to ask, how do I add a subtitle also?
June 5, 2015 at 2:59 pm #293759Hey there,
If you take a look at the code provided before, you can see we just commented out the title and subtitle, which effectively removes them from the front end.
<!-- <h1 class="h-landmark"><span><?php echo x_get_option( 'x_integrity_blog_title' ); ?></span></h1> <p class="p-landmark-sub"><span><?php echo x_get_option( 'x_integrity_blog_subtitle' ); ?></span></p> -->
You can get the subtitle back by removing the HTML comment tags, or moving them to just wrap the main headline.
June 6, 2015 at 8:33 am #294384Hmm I’m sorry but I am a little confused now, am I supposed to be replacing part of the code or all of it for what you have just provided?
What is the exact code that I need please for the blog header and subheader to remain visible but be consistent with the rest of my headings/subheadings on my site?
Thank you 🙂
June 7, 2015 at 1:55 am #294804HI there,
Please try this code :
<?php // ============================================================================= // VIEWS/INTEGRITY/_LANDMARK-HEADER.PHP // ----------------------------------------------------------------------------- // Handles content output of large headers for key pages such as the blog or // search results. // ============================================================================= $disable_page_title = get_post_meta( get_the_ID(), '_x_entry_disable_page_title', true ); $disable_filters = get_post_meta( get_the_ID(), '_x_portfolio_disable_filtering', true ); ?> <?php if ( is_home() && x_get_option( 'x_integrity_blog_header_enable', '1' ) == '1' ) : ?> <header class="x-header-landmark x-container max width custom-landmark-container"> <div class="custom-landmark x-container max width">Blog / News</div> <!-- <h1 class="h-landmark"><span><?php echo x_get_option( 'x_integrity_blog_title' ); ?></span></h1> <p class="p-landmark-sub"><span><?php echo x_get_option( 'x_integrity_blog_subtitle' ); ?></span></p> --> </header> <?php elseif ( is_search() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Search Results', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "Below you'll see everything we could locate for your search of ", '__x__' ); echo '<strong>“'; the_search_query(); echo '”</strong>'; ?></span></p> </header> <?php elseif ( is_category() || x_is_portfolio_category() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Category Archive', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been categorized as ", '__x__' ) . '<strong>“' . single_cat_title( '', false ) . '”</strong>'; ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo x_get_option( 'x_integrity_blog_title' ); ?></span></h1> <p class="p-landmark-sub"><span> <?php echo x_get_option( 'x_integrity_blog_subtitle' ); ?></span></p> </header> <?php elseif ( x_is_product_category() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Category Archive', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all items that have been categorized as ", '__x__' ) . '<strong>“' . single_cat_title( '', false ) . '”</strong>'; ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title ?></span></h1> <p class="p-landmark-sub"><span><?php echo $subtitle ?></span></p> </header> <?php elseif ( is_tag() || x_is_portfolio_tag() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Tag Archive', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been tagged as ", '__x__' ) . '<strong>“' . single_tag_title( '', false ) . '”</strong>'; ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title; ?></span></h1> <p class="p-landmark-sub"><span><?php echo $subtitle; ?></span></p> </header> <?php elseif ( x_is_product_tag() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Tag Archive', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all items that have been tagged as ", '__x__' ) . '<strong>“' . single_tag_title( '', false ) . '”</strong>'; ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title; ?></span></h1> <p class="p-landmark-sub"><span><?php echo $subtitle; ?></span></p> </header> <?php elseif ( is_404() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Oops!', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "You blew up the Internet. ", '__x__' ); ?></span></p> </header> <?php elseif ( is_year() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Year', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'Y' ); echo '</strong>'; ?></span></p> </header> <?php elseif ( is_month() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Month', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'F, Y' ); echo '</strong>'; ?></span></p> </header> <?php elseif ( is_day() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Day', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'F j, Y' ); echo '</strong>'; ?></span></p> </header> <?php elseif ( x_is_portfolio() ) : ?> <?php if ( $disable_page_title != 'on' || $disable_filters != 'on' ) : ?> <header class="x-header-landmark x-container max width"> <?php if ( $disable_page_title != 'on' ) : ?> <h1 class="h-landmark"><span><?php the_title(); ?></span></h1> <?php endif; ?> <?php x_portfolio_filters(); ?> </header> <?php endif; ?> <?php elseif ( x_is_shop() && x_get_option( 'x_integrity_shop_header_enable', '1' ) == '1' ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo x_get_option( 'x_integrity_shop_title' ); ?></span></h1> <p class="p-landmark-sub"><span><?php echo x_get_option( 'x_integrity_shop_subtitle' ); ?></span></p> </header> <?php elseif ( x_is_buddypress() ) : ?> <?php if ( x_buddypress_is_component_with_landmark_header() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo x_buddypress_get_the_title(); ?></span></h1> <p class="p-landmark-sub"><span><?php echo x_buddypress_get_the_subtitle(); ?></span></p> </header> <?php endif; ?> <?php endif; ?>
Hope it helps.
June 7, 2015 at 5:23 pm #295229Okay thanks I have tried that but it doesn’t appear to of changed anything (?)
The font and weight are still wrong, plus I still do not have a sub header, do I need to change the CSS x-container code also?
Here is what I have :
.x-container.max.custom-landmark-container {
padding-top: 25px;
padding-bottom: 25px;
font-size: 35px;
color: #e5e5e5;
margin-top: 0;
width: 100%;
max-width: 100%;
}Thanks again 🙂
June 7, 2015 at 5:33 pm #295234I also have further questions to ask in regards to the blog that I cannot find answers too, do you want me to ask them here or do you want me to start a separate thread?
Thank you
June 8, 2015 at 2:19 am #295508Hi there,
Upon checking your site, I noticed the code is commented, so you can see changes :
Please remove the HTML comment tags.
Try this code for headline :
.custom-landmark.x-container.max.width { padding-top: 68px; padding-bottom: 25px; font-size: 35px; color: #e5e5e5; margin-top: 0; width: 100%; font-weight: 200; max-width: 100%; }
Please open a new topic for further questions.
Thanks.
June 8, 2015 at 5:39 pm #296298Okay, the font is looking better but it remains in lower case where all my other headings are uppercase, and in the customizer it has been input as uppercase also(?)
I also still do not have a sub heading either.
I am sorry but I do not understand what you mean by ‘Please remove the HTML comment tags’.
Thanks!
June 9, 2015 at 7:34 am #296782Hi there,
Please add this as well :
.custom-landmark.x-container.max.width { text-transform: uppercase; }
I removed the tags, please open _landmark-header.php file and replace exsting code with this one :
<?php // ============================================================================= // VIEWS/INTEGRITY/_LANDMARK-HEADER.PHP // ----------------------------------------------------------------------------- // Handles content output of large headers for key pages such as the blog or // search results. // ============================================================================= $disable_page_title = get_post_meta( get_the_ID(), '_x_entry_disable_page_title', true ); $disable_filters = get_post_meta( get_the_ID(), '_x_portfolio_disable_filtering', true ); ?> <?php if ( is_home() && x_get_option( 'x_integrity_blog_header_enable', '1' ) == '1' ) : ?> <header class="x-header-landmark x-container max width custom-landmark-container"> <div class="custom-landmark x-container max width">Blog / News</div> <h1 class="h-landmark"><span><?php echo x_get_option( 'x_integrity_blog_title' ); ?></span></h1> <p class="p-landmark-sub"><span><?php echo x_get_option( 'x_integrity_blog_subtitle' ); ?></span></p> </header> <?php elseif ( is_search() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Search Results', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "Below you'll see everything we could locate for your search of ", '__x__' ); echo '<strong>“'; the_search_query(); echo '”</strong>'; ?></span></p> </header> <?php elseif ( is_category() || x_is_portfolio_category() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Category Archive', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been categorized as ", '__x__' ) . '<strong>“' . single_cat_title( '', false ) . '”</strong>'; ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title ?></span></h1> <p class="p-landmark-sub"><span><?php echo $subtitle ?></span></p> </header> <?php elseif ( x_is_product_category() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Category Archive', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all items that have been categorized as ", '__x__' ) . '<strong>“' . single_cat_title( '', false ) . '”</strong>'; ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title ?></span></h1> <p class="p-landmark-sub"><span><?php echo $subtitle ?></span></p> </header> <?php elseif ( is_tag() || x_is_portfolio_tag() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Tag Archive', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been tagged as ", '__x__' ) . '<strong>“' . single_tag_title( '', false ) . '”</strong>'; ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title; ?></span></h1> <p class="p-landmark-sub"><span><?php echo $subtitle; ?></span></p> </header> <?php elseif ( x_is_product_tag() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Tag Archive', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all items that have been tagged as ", '__x__' ) . '<strong>“' . single_tag_title( '', false ) . '”</strong>'; ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title; ?></span></h1> <p class="p-landmark-sub"><span><?php echo $subtitle; ?></span></p> </header> <?php elseif ( is_404() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Oops!', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "You blew up the Internet. ", '__x__' ); ?></span></p> </header> <?php elseif ( is_year() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Year', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'Y' ); echo '</strong>'; ?></span></p> </header> <?php elseif ( is_month() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Month', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'F, Y' ); echo '</strong>'; ?></span></p> </header> <?php elseif ( is_day() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Day', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'F j, Y' ); echo '</strong>'; ?></span></p> </header> <?php elseif ( x_is_portfolio() ) : ?> <?php if ( $disable_page_title != 'on' || $disable_filters != 'on' ) : ?> <header class="x-header-landmark x-container max width"> <?php if ( $disable_page_title != 'on' ) : ?> <h1 class="h-landmark"><span><?php the_title(); ?></span></h1> <?php endif; ?> <?php x_portfolio_filters(); ?> </header> <?php endif; ?> <?php elseif ( x_is_shop() && x_get_option( 'x_integrity_shop_header_enable', '1' ) == '1' ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo x_get_option( 'x_integrity_shop_title' ); ?></span></h1> <p class="p-landmark-sub"><span><?php echo x_get_option( 'x_integrity_shop_subtitle' ); ?></span></p> </header> <?php elseif ( x_is_buddypress() ) : ?> <?php if ( x_buddypress_is_component_with_landmark_header() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo x_buddypress_get_the_title(); ?></span></h1> <p class="p-landmark-sub"><span><?php echo x_buddypress_get_the_subtitle(); ?></span></p> </header> <?php endif; ?> <?php endif; ?>
Hope it helps.
June 9, 2015 at 5:06 pm #297372Okay the CSS worked for the uppercase, thanks!
However the php code totally doesn’t work, see here :
http://www.mode500.com/wp-content/uploads/2015/06/wrongblog.jpg
This is what I am trying to achieve hopefully :
http://www.mode500.com/wp-content/uploads/2015/06/rightblog.jpg
Along with all the header/subheader issues the padding at the top is also completely off compared to my other pages.
In order to try and help you, here is the code that I already have in the _landmark-header.php file :
<?php // ============================================================================= // VIEWS/INTEGRITY/_LANDMARK-HEADER.PHP // ----------------------------------------------------------------------------- // Handles content output of large headers for key pages such as the blog or // search results. // ============================================================================= $disable_page_title = get_post_meta( get_the_ID(), '_x_entry_disable_page_title', true ); $disable_filters = get_post_meta( get_the_ID(), '_x_portfolio_disable_filtering', true ); ?> <?php if ( is_home() && x_get_option( 'x_integrity_blog_header_enable', '1' ) == '1' ) : ?> <header class="x-header-landmark x-container max width custom-landmark-container"> <div class="custom-landmark x-container max width">Blogged</div> <!-- <h1 class="h-landmark"><span><?php echo x_get_option( 'x_integrity_blog_title' ); ?></span></h1> <p class="p-landmark-sub"><span><?php echo x_get_option( 'x_integrity_blog_subtitle' ); ?></span></p> --> </header> <?php elseif ( is_search() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Search Results', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "Below you'll see everything we could locate for your search of ", '__x__' ); echo '<strong>“'; the_search_query(); echo '”</strong>'; ?></span></p> </header> <?php elseif ( is_category() || x_is_portfolio_category() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Category Archive', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been categorized as ", '__x__' ) . '<strong>“' . single_cat_title( '', false ) . '”</strong>'; ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo x_get_option( 'x_integrity_blog_title' ); ?></span></h1> <p class="p-landmark-sub"><span> <?php echo x_get_option( 'x_integrity_blog_subtitle' ); ?></span></p> </header> <?php elseif ( x_is_product_category() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Category Archive', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all items that have been categorized as ", '__x__' ) . '<strong>“' . single_cat_title( '', false ) . '”</strong>'; ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title ?></span></h1> <p class="p-landmark-sub"><span><?php echo $subtitle ?></span></p> </header> <?php elseif ( is_tag() || x_is_portfolio_tag() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Tag Archive', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been tagged as ", '__x__' ) . '<strong>“' . single_tag_title( '', false ) . '”</strong>'; ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title; ?></span></h1> <p class="p-landmark-sub"><span><?php echo $subtitle; ?></span></p> </header> <?php elseif ( x_is_product_tag() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Tag Archive', '__x__' ); $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all items that have been tagged as ", '__x__' ) . '<strong>“' . single_tag_title( '', false ) . '”</strong>'; ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title; ?></span></h1> <p class="p-landmark-sub"><span><?php echo $subtitle; ?></span></p> </header> <?php elseif ( is_404() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Oops!', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "You blew up the Internet. ", '__x__' ); ?></span></p> </header> <?php elseif ( is_year() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Year', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'Y' ); echo '</strong>'; ?></span></p> </header> <?php elseif ( is_month() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Month', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'F, Y' ); echo '</strong>'; ?></span></p> </header> <?php elseif ( is_day() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php _e( 'Post Archive by Day', '__x__' ); ?></span></h1> <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'F j, Y' ); echo '</strong>'; ?></span></p> </header> <?php elseif ( x_is_portfolio() ) : ?> <?php if ( $disable_page_title != 'on' || $disable_filters != 'on' ) : ?> <header class="x-header-landmark x-container max width"> <?php if ( $disable_page_title != 'on' ) : ?> <h1 class="h-landmark"><span><?php the_title(); ?></span></h1> <?php endif; ?> <?php x_portfolio_filters(); ?> </header> <?php endif; ?> <?php elseif ( x_is_shop() && x_get_option( 'x_integrity_shop_header_enable', '1' ) == '1' ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo x_get_option( 'x_integrity_shop_title' ); ?></span></h1> <p class="p-landmark-sub"><span><?php echo x_get_option( 'x_integrity_shop_subtitle' ); ?></span></p> </header> <?php elseif ( x_is_buddypress() ) : ?> <?php if ( x_buddypress_is_component_with_landmark_header() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo x_buddypress_get_the_title(); ?></span></h1> <p class="p-landmark-sub"><span><?php echo x_buddypress_get_the_subtitle(); ?></span></p> </header> <?php endif; ?> <?php endif; ?>
Thank you 🙂
-
AuthorPosts