WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Eleven
Undefined Function In Theme (7 posts)

  1. c365954
    Member
    Posted 3 years ago #

    When I try to preview this theme I get

    Fatal error: Call to undefined function is_multi_author() in /home/allabo11/public_html/wp-content/themes/twentyeleven/functions.php on line 583

    Can someone please advise me what to correct?

    http://wordpress.org/extend/themes/twentyeleven/

  2. pixelnate
    Member
    Posted 3 years ago #

    I could be wrong, but I believe that is_multi_author() is a function introduced in WordPress 3.2.

  3. pixelnate
    Member
    Posted 3 years ago #

  4. Conqueror
    Member
    Posted 3 years ago #

    It's trivial to add this to /wp-content/themes/twentyeleven/functions.php

    function is_multi_author() {
      global $wpdb;
      $rows = (array) $wpdb->get_col("SELECT DISTINCT post_author FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' LIMIT 2");
      $is_multi_author = 1 < count( $rows ) ? 1 : 0;
      return (bool) $is_multi_author;
    }
  5. garymotteram
    Member
    Posted 2 years ago #

    Where does this code go? Should it replace the existing code? I have tried various options, but no joy currently.

  6. alchymyth
    Forum Moderator
    Posted 2 years ago #

    @garymotteram
    why don't you upgrade to wp3.2?

    Where does this code go? Should it replace the existing code?

    generally, it would be added into functions.php of your theme;
    however, i would not advise this, as you are going to get another error message when you later update.

  7. monkz
    Member
    Posted 2 years ago #

    Thanks for the posts. I was having this problem as well, went to the dash, found the link to update and it solved the problem. :)

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic