WordPress.org

Ready to get started?Download WordPress

Forums

Taxonomy.php error (2 posts)

  1. dougkpga
    Member
    Posted 3 years ago #

    This error has shut down my whole blog..

    Fatal error: Call to a member function add_rewrite_tag() on a non-object in /home/dougkpga/public_html/wp-includes/taxonomy.php on line 289

    This is the line of code. How would I fix it please?

    $wp_rewrite->add_rewrite_tag("%$taxonomy%", '([^/]+)', $args['query_var'] ? "{$args['query_var']}=" : "taxonomy=$taxonomy&term=");

  2. dougkpga
    Member
    Posted 3 years ago #

    Ok this is ridiculous

    I have checked the code in 3 versions of wordpress in the taxonomy.php file and they are all identical - therefore why am I getting fatal error when there is no error....

    Fatal error
    $wp_rewrite->add_rewrite_tag("%$taxonomy%", '([^/]+)',
    $args['query_var'] ? "{$args['query_var']}=" :
    "taxonomy=$taxonomy&term=");

    3.0.1
    $wp_rewrite->add_rewrite_tag("%$taxonomy%", '([^/]+)',
    $args['query_var'] ? "{$args['query_var']}=" :
    "taxonomy=$taxonomy&term=");

    3.01
    $wp_rewrite->add_rewrite_tag("%$taxonomy%", '([^/]+)',
    $args['query_var'] ? "{$args['query_var']}=" :
    "taxonomy=$taxonomy&term=");

    3.0
    $wp_rewrite->add_rewrite_tag("%$taxonomy%", '([^/]+)',
    $args['query_var'] ? "{$args['query_var']}=" :
    "taxonomy=$taxonomy&term=");

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.