Welcome, guest!

Feel free to read the blog, browse for themes, or join the club.

Tabs Error After Upgrade

  1. Hi Justin,
    I just upgraded to Wordpress 2.9.1 and seem to have lost my admin interface.
    I tried deleting out the code where the error is found but no joy, not sure what to do next.
    The error is located at...
    http://GLOBALEVANGELISTS.COM/wp-content/themes/hybrid-news/functions.php on line 22
    Fatal error: Call to undefined function register_hybrid_tab()

  2. You must be a logged-in exclusive member to view this reply.

  3. You must be a logged-in exclusive member to view this reply.

  4. Sorry, I forgot to check which forum to post in, here's the code.

    register_hybrid_tab( 'my_most_popular', array( 'label' => 'Most Popular', 'callback' => 'my_most_popular' ) );
    
    function my_most_popular() {
    	echo '<ul>';
    	akpc_most_popular( 10, '<li>', '</li>', false, true );
    	echo '</ul>';
    }
    
    register_hybrid_tab( 'my_daily_posts', array( 'label' => 'My Daily Posts', 'callback' => 'my_daily_posts' ) );
    
    function my_daily_posts() {
    	echo '<ul class="xoxo">';
    	wp_get_archives( array( 'type' => 'postbypost', 'limit' => 10 ) );
    	echo '</ul>';
    }
  5. You must be a logged-in exclusive member to view this reply.

  6. 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;
    }
  7. You must be a logged-in exclusive member to view this reply.

  8. Legend,
    Thanks Justin

Reply

You must log in to post.

Limited Access

If you have an account, please take a moment to log in.

Non-exclusive members have limited access to the support forums.

To enjoy the full range of support, sign up for an exclusive membership in the theme club.

Support Forums

  • Core Framework (55 posts)
  • Hybrid Theme (22,711 posts)
  • Bliss Theme (255 posts)
  • Options Theme (10,362 posts)
  • Visionary Theme (767 posts)
  • WordPress (144 posts)
  • WordPress Plugins (2,146 posts)
  • bbPress Themes (308 posts)
  • General Discussion (5,572 posts)
  • Critical Theme (0 posts)
  • Hybrid News Theme (132 posts)
  • Hybrid Original Theme (26 posts)
  • Leviathan Theme (16 posts)
  • Life Collage Theme (9 posts)
  • Old School Theme (3 posts)
  • Outline Theme (108 posts)
  • Skeleton Theme (40 posts)
  • Structure Theme (2,768 posts)
  • Members Plugin (2 posts)
  • Cleaner Gallery Plugin (14 posts)
  • Get the Image Plugin (3 posts)
  • Message Board Plugin (0 posts)
  • Widgets Reloaded Plugin (0 posts)
  • Breadcrumb Trail Plugin (0 posts)
  • Query Posts Plugin (80 posts)
  • Hybrid Hook Plugin (7 posts)
  • Hybrid Hook Widgets Plugin (0 posts)
  • Hybrid Tabs (5 posts)