Skip to content

Instantly share code, notes, and snippets.

@arelthia
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arelthia/17ffae7a975f4a29b76e to your computer and use it in GitHub Desktop.
Save arelthia/17ffae7a975f4a29b76e to your computer and use it in GitHub Desktop.
Builder - No Title Extension
<?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