Hi Justin,
I seem to be getting another error when I add the new code...
Fatal error: Call to undefined function register_hybrid_tab() in /GLOBALEVANGELISTS.COM/wp-content/themes/hybrid-news/functions.php on line 45
Here is All of the code I have added to my functions.php above the constant paths
add_filter( 'get_the_image_args', 'my_image_args' );
function my_image_args( $args ) {
$args['attachment'] = false;
return $args;
}
if ( function_exists( 'ns_show_top_commentators' ) )
register_hybrid_tab( 'my_top_commentators', array( 'label' => 'Top Commentators', 'callback' => 'my_top_commentators' ) );
function my_top_commentators() {
echo '<ul>';
ns_show_top_commentators();
echo '</ul>';
}
add_action( 'init', 'register_my_tabs' );
function register_my_tabs() {
if ( function_exists( 'register_hybrid_tab' ) ) {
register_hybrid_tab( 'my_most_popular', array( 'label' => 'Most Popular', 'callback' => 'my_most_popular' ) );
register_hybrid_tab( 'my_daily_posts', array( 'label' => 'My Daily Posts', 'callback' => 'my_daily_posts' ) );
}
}
function my_most_popular() {
echo '<ul>';
akpc_most_popular( 10, '<li>', '</li>', false, true );
echo '</ul>';
}
function my_daily_posts() {
echo '<ul class="xoxo">';
wp_get_archives( array( 'type' => 'postbypost', 'limit' => 10 ) );
echo '</ul>';
}
add_action( 'init', 'create_my_custom_tabs' );
function create_my_custom_tabs() {
register_hybrid_tab( 'custom_1', array( 'label' => 'Most Popular', 'callback' => 'akpc_most_popular' ) );
register_hybrid_tab( 'basketball', array( 'label' => 'Basketball Scores', 'callback' => 'basketball_scores' ) );
}
add_filter( 'wp_list_pages_excludes', 'remove_pages_from_list' );
function remove_pages_from_list( $excludes ) {
return array( 135,6,450 );
}
add_action( 'template_redirect', 'my_move_byline' );
function my_move_byline() {
if ( is_single() ) :
remove_action( 'hybrid_before_entry', 'hybrid_byline' );
add_action( 'hybrid_after_entry', 'hybrid_byline' );
endif;
}