Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save eri-trabiccolo/b6168555362446047c87 to your computer and use it in GitHub Desktop.
Save eri-trabiccolo/b6168555362446047c87 to your computer and use it in GitHub Desktop.
Show the date before the title in post lists
/* 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