Last active
August 29, 2015 14:01
-
-
Save arelthia/17ffae7a975f4a29b76e to your computer and use it in GitHub Desktop.
Builder - No Title Extension
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 | |
if ( is_admin() ) | |
return; | |
if ( ! class_exists( 'ExtensionNoTitleLayout' ) ) { | |
class ExtensionNoTitleLayout { | |
function ExtensionNoTitleLayout() { | |
it_classes_load( 'it-file-utility.php' ); | |
$this->_base_url = ITFileUtility::get_url_from_file( dirname( __FILE__ ) ); | |
add_action( 'builder_layout_engine_render', array( &$this, 'change_render_content' ), 0 ); | |
} | |
function extension_render_content() { | |
?> | |
<?php if ( have_posts() ) : ?> | |
<div class="loop"> | |
<div class="loop-content"> | |
<?php while ( have_posts() ) : // The Loop ?> | |
<?php the_post(); ?> | |
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | |
<div class="entry-content clearfix"> | |
<?php the_content(); ?> | |
</div> | |
</div> | |
<?php endwhile; ?> | |
</div> | |
</div> | |
<?php else : ?> | |
<?php do_action( 'builder_template_show_not_found' ); ?> | |
<?php endif; ?> | |
<?php | |
} | |
function change_render_content() { | |
remove_action( 'builder_layout_engine_render_content', 'render_content' ); | |
add_action( 'builder_layout_engine_render_content', array( &$this, 'extension_render_content' ) ); | |
} | |
} | |
$ExtensionNoTitleLayout = new ExtensionNoTitleLayout(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment