Hi I had originally asked for help with getting the landmark headers to work on pages such as shop, cart, blog and portfolio that disappear when you set up Pro and I was referred to the post that has the short code and custom code in the child theme functions.php and it didn’t work right at all. I couldn’t get the titles to line up right and on mobile it was styled weird and showed up half way down the page when I inserted the shortcode onto the global header. I was wondering if this could be because the following code they have is for Integrity and I have Renew. Could you have a look this is the code they say to add to the functions.php (see below) because I see it mentions integrity. Would you tell me the correct code to make the landmarks show up on those pages that is for Renew and how to make it show up like it use to. Thanks
add_shortcode(‘awesome_landmark’,‘awesome_landmark’);
function awesome_landmark ( $atts ) {
ob_start();
$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' ) : ?><?php echo x_get_option( 'x_integrity_blog_title' ); ?>
<?php echo x_get_option( 'x_integrity_blog_subtitle' ); ?>
<?php elseif ( is_search() ) : ?><?php _e( 'Search Results', '__x__' ); ?>
<?php _e( "Below you'll see everything we could locate for your search of ", '__x__' ); echo '“'; the_search_query(); echo '”'; ?>
<?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__' ) . '“' . single_cat_title( '', false ) . '”'; ?><?php echo $title ?>
<?php echo $subtitle ?>
<?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__' ) . '“' . single_cat_title( '', false ) . '”'; ?><?php echo $title ?>
<?php echo $subtitle ?>
<?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__' ) . '“' . single_tag_title( '', false ) . '”'; ?><?php echo $title; ?>
<?php echo $subtitle; ?>
<?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__' ) . '“' . single_tag_title( '', false ) . '”'; ?><?php echo $title; ?>
<?php echo $subtitle; ?>
<?php elseif ( is_404() ) : ?><?php _e( 'Oops!', '__x__' ); ?>
<?php _e( "You blew up the Internet. ", '__x__' ); ?>
<?php elseif ( is_year() ) : ?><?php _e( 'Post Archive by Year', '__x__' ); ?>
<?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo ''; echo get_the_date( 'Y' ); echo ''; ?>
<?php elseif ( is_month() ) : ?><?php _e( 'Post Archive by Month', '__x__' ); ?>
<?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo ''; echo get_the_date( 'F, Y' ); echo ''; ?>
<?php elseif ( is_day() ) : ?><?php _e( 'Post Archive by Day', '__x__' ); ?>
<?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo ''; echo get_the_date( 'F j, Y' ); echo ''; ?>
<?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' ) : ?>
<?php echo x_get_option( 'x_integrity_shop_title' ); ?>
<?php echo x_get_option( 'x_integrity_shop_subtitle' ); ?>
<?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;
return ob_get_clean();
}