Created
March 21, 2015 17:57
-
-
Save eri-trabiccolo/b6168555362446047c87 to your computer and use it in GitHub Desktop.
Show the date before the title in post lists
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
/* will not work with the expanded post in post list grid */ | |
add_action('__before_content_title', 'show_date_before_title'); | |
function show_date_before_title(){ | |
$method_exists = ( array_product( array( | |
method_exists('TC_post_metas', 'tc_get_meta_date'), | |
method_exists('TC_post_list', 'tc_post_list_controller'), | |
method_exists('TC_post_list_grid', 'tc_is_grid_enabled'), | |
))); | |
if ( $method_exists && ( TC_post_list_grid::$instance -> tc_is_grid_enabled() || TC_post_list::$instance -> tc_post_list_controller() ) ) | |
echo TC_post_metas::$instance->tc_get_meta_date(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment