Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
add_action( 'wp_head', 'remove_my_action' );
function remove_my_action(){
global $wp_query;
if(is_front_page()){
add_action( 'wen_corporate_action_before_primary', 'wen_corporate_implement_front_page_widget_area');
}
if(is_home()){
add_action( 'wen_corporate_action_front_page', 'wen_corporate_implement_front_page_posts_area');
remove_action( 'wen_corporate_action_front_page', 'wen_corporate_implement_front_page_widget_area',10);
remove_action( 'wen_corporate_action_before_primary', 'wen_corporate_implement_front_page_widget_area',10);
}
}
function wen_corporate_implement_front_page_posts_area(){
?>
<?php if ( have_posts() ) : ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
/* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
?>
<?php endwhile; ?>
<?php wen_corporate_paging_nav(); ?>
<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment