Last active
August 29, 2015 14:05
-
-
Save fovoc/5333083a90f700117305 to your computer and use it in GitHub Desktop.
Shoestrap 3.2.6 - remove page title from content-page template using Conditional Tags
This file contains hidden or 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 | |
| // Our new content-page template (we don't need the title section in this) | |
| function no_title_page_content() { | |
| global $ss_framework; | |
| while ( have_posts() ) : the_post(); | |
| //shoestrap_title_section(); | |
| do_action( 'shoestrap_entry_meta' ); | |
| do_action( 'shoestrap_page_pre_content' ); | |
| the_content(); | |
| echo $ss_framework->clearfix(); | |
| shoestrap_meta( 'cats' ); | |
| shoestrap_meta( 'tags' ); | |
| do_action( 'shoestrap_page_after_content' ); | |
| wp_link_pages( array( 'before' => '<nav class="pagination">', 'after' => '</nav>' ) ); | |
| endwhile; | |
| } | |
| // when to use the new content-page template? | |
| // use any Conditional Tags (http://codex.wordpress.org/Conditional_Tags) to trigger the new content | |
| function use_no_title_page_content() { | |
| if ( is_home() || is_page('clearing-floats') ) { | |
| add_action( 'shoestrap_content_page_override', 'no_title_page_content' ); | |
| } | |
| } | |
| add_action( 'wp', 'use_no_title_page_content' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment