Created
December 6, 2017 10:43
-
-
Save anonymous/a721e9860bf5cba0271ca711fd4de524 to your computer and use it in GitHub Desktop.
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
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