Created
August 31, 2012 16:47
-
-
Save pnething/3555712 to your computer and use it in GitHub Desktop.
page.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header(); ?> | |
<?php $has_sidebar = ss_framework_check_page_layout(); ?> | |
<?php if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page | |
echo 'Events Calendar'; | |
} elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages | |
echo 'Events Calendar'; | |
} elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List | |
echo 'Events List'; | |
} else { | |
$page_title = ss_framework_get_custom_field(‘ss_page_title’); | |
ss_framework_get_custom_field(‘ss_page_title’) : get_the_title(); | |
}; ?> | |
<section id="content" class="clearfix <?php echo ss_framework_check_sidebar_position(); ?>"> | |
<div class="container"> | |
<?php if ( !is_front_page() && ss_framework_get_custom_field('ss_disable_page_header') != '1' ): ?> | |
<header class="page-header"> | |
<h1 class="page-title"><?php echo $page_title ?></h1> | |
<?php if( ss_framework_get_custom_field('ss_page_description') ): ?> | |
<hr /> | |
<h2 class="page-description"><?php echo ss_framework_get_custom_field('ss_page_description'); ?></h2> | |
<?php endif; ?> | |
<?php if( ss_framework_get_custom_field('ss_page_subdescription') ): ?> | |
<hr /> | |
<h2 class="page-subdescription"><?php echo ss_framework_get_custom_field('ss_page_subdescription'); ?></h2> | |
<?php endif; ?> | |
<?php do_action('ss_framework_portfolio_filter'); ?> | |
</header><!-- end .page-header --> | |
<?php endif; ?> | |
<?php if( $has_sidebar ): ?> | |
<section id="main"> | |
<?php endif; ?> | |
<?php if (have_posts()) while ( have_posts() ): the_post(); ?> | |
<?php the_content(); ?> | |
<?php wp_link_pages( array( 'before' => '' . __( 'Pages:', 'ss_framework' ), 'after' => '' ) ); ?> | |
<p><?php edit_post_link( __( 'Edit', 'ss_framework' ), '', '' ); ?></p> | |
<?php endwhile; ?> | |
<?php if( $has_sidebar ): ?> | |
</section><!-- end #main --> | |
<?php get_sidebar(); ?> | |
<?php endif; ?> | |
</div><!-- end .container --> | |
</section><!-- end #content --> | |
<?php get_footer(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header(); ?> | |
<?php $has_sidebar = ss_framework_check_page_layout(); ?> | |
<?php $page_title = ss_framework_get_custom_field('ss_page_title') ? ss_framework_get_custom_field('ss_page_title') : get_the_title(); ?> | |
<section id="content" class="clearfix <?php echo ss_framework_check_sidebar_position(); ?>"> | |
<div class="container"> | |
<?php if ( !is_front_page() && ss_framework_get_custom_field('ss_disable_page_header') != '1' ): ?> | |
<header class="page-header"> | |
<h1 class="page-title"><?php echo $page_title ?></h1> | |
<?php if( ss_framework_get_custom_field('ss_page_description') ): ?> | |
<hr /> | |
<h2 class="page-description"><?php echo ss_framework_get_custom_field('ss_page_description'); ?></h2> | |
<?php endif; ?> | |
<?php if( ss_framework_get_custom_field('ss_page_subdescription') ): ?> | |
<hr /> | |
<h2 class="page-subdescription"><?php echo ss_framework_get_custom_field('ss_page_subdescription'); ?></h2> | |
<?php endif; ?> | |
<?php do_action('ss_framework_portfolio_filter'); ?> | |
</header><!-- end .page-header --> | |
<?php endif; ?> | |
<?php if( $has_sidebar ): ?> | |
<section id="main"> | |
<?php endif; ?> | |
<?php if (have_posts()) while ( have_posts() ): the_post(); ?> | |
<?php the_content(); ?> | |
<?php wp_link_pages( array( 'before' => '' . __( 'Pages:', 'ss_framework' ), 'after' => '' ) ); ?> | |
<p><?php edit_post_link( __( 'Edit', 'ss_framework' ), '', '' ); ?></p> | |
<?php endwhile; ?> | |
<?php if( $has_sidebar ): ?> | |
</section><!-- end #main --> | |
<?php get_sidebar(); ?> | |
<?php endif; ?> | |
</div><!-- end .container --> | |
</section><!-- end #content --> | |
<?php get_footer(); ?> |
I see what the problem is, you need to assign the custom titles to the $page_title variable since that's what is actually used for the display. This should work.
Try this for categories:
Correction:
Ooops, try this:
Awesome. This works!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Philipp, try this:
<?php if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page
echo 'Events Calendar';
} elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages
echo 'Events Calendar';
} elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List
echo 'Events List';
} else {
$page_title = ss_framework_get_custom_field('ss_page_title') ? ss_framework_get_custom_field('ss_page_title') : get_the_title();
}; ?>