-
AuthorPosts
-
September 24, 2015 at 7:25 pm #401691
Is there a way to enable the blog header in Ethos? There is not an option to do so in the Blog Options or Stack Options.
September 25, 2015 at 12:29 am #456421Hello Jeffrey,
Thanks for posting in.
Blog header option is only available for Integrity and Renew stacks only. That is available via customization.
Please setup up a child theme. Then copy the file _landmark-header.php from your-wordpress-folder\wp-content\themes\x\framework\views\ethos and paste it to your-wordpress-folder\wp-content\themes\x-child\framework\views\ethos . Open the file using text editor and replace the entire code with the following:<?php // ============================================================================= // VIEWS/ETHOS/_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 ); ?> <?php if ( ! x_is_blank( 1 ) && ! x_is_blank( 2 ) && ! x_is_blank( 4 ) && ! x_is_blank( 5 ) ) : ?> <?php if ( is_page() && $disable_page_title == 'on' ) : ?> <?php else : ?> <?php if ( x_is_shop() || x_is_product() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo x_get_option( 'x_ethos_shop_title' ); ?></span></h1> </header> <?php elseif ( x_is_bbpress() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo get_the_title(); ?></span></h1> </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> </header> <?php endif; ?> <?php elseif ( is_page() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark entry-title"><span><?php the_title(); ?></span></h1> </header> <?php elseif ( is_home() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark entry-title"><span><?php echo "BLOG TITLE GOES HERE"; ?></span></h1> </header> <?php elseif ( x_is_portfolio_item() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php the_title(); ?></span></h1> </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> </header> <?php elseif ( is_category() || x_is_portfolio_category() || x_is_product_category() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Category Archive', '__x__' ); ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title; ?></span></h1> </header> <?php elseif ( is_tag() || x_is_portfolio_tag() || x_is_product_tag() ) : ?> <?php $meta = x_get_taxonomy_meta(); $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Tag Archive', '__x__' ); ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo $title ?></span></h1> </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> </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> </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> </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> </header> <?php elseif ( x_is_portfolio() ) : ?> <header class="x-header-landmark x-container max width"> <h1 class="h-landmark"><span><?php echo x_get_option( 'x_portfolio_title' ); ?></span></h1> </header> <?php endif; ?> <?php endif; ?> <?php endif; ?>
Change BLOG TITLE GOES HERE to your preferred header.
Further customizations from here would be getting into custom development, which is outside the scope of support we can offer. If you need more in depth changes, you may wish to consult with a developer. X is quite extensible with child themes, so there are plenty of possibilities. Thanks for understanding.
November 21, 2015 at 2:19 pm #674375Hi
I am using a category page to list my blog posts. It has a heading and a sub-heading as in the attached screen shot (1).
Can I get this to appear above each blog post too? See screenshot 2 approx position marked by arrow).
Note if this requires significant PHP changes I would prefer to avoid that! It has something to do with h-landmark and p-landmark-sub, or fo rthe whole region ‘header.x-header-landmark x-container.max.width’. COuld this be done wiht CSS?
Thanks for looking.
November 21, 2015 at 10:06 pm #674637Hello There,
Thanks for updating this thread! The heading and subheading for the category page archive and be only be added using significant PHP changes in your child theme. It could be possible with custom development, but this would be outside the scope of support we can offer.
This cannot be done with css. If you need anything else we can help you with, please let us know.
-
AuthorPosts