Fatal error:

  • Author
    Posts
  • #1480220

    Hi I added the following code to the functions.php page and clicked view page.

    //call a function just before the query runs to fetch posts
    add_action(‘pre_get_posts’,’change_post_type’);

    function change_post_type($var) {
    if(is_category()) {
    $var->query_vars[‘post_type’] = ‘any’;
    //it will change the value to ‘any’ from the default value of ;post’;
    //can be any, attachment, page, post, or revision.
    //’any’ retrieves any type except revisions.
    }
    }

    I got the following error!

    Fatal error: Cannot redeclare change_post_type() (previously declared in /home/julwre/WiredVoltage.com/wp-content/plugins/map-categories-to-pages/map-categories-to-pages.php:72) in /home/julwre/WiredVoltage.com/wp-content/themes/ifeature/functions.php on line 349

    Now I am unable to access the site or any of the functions in dashboard so undo the changes.

    Am I able to access the functions.php page another way so I can undo the changes???

    Many thanks

    The blog I need help with is www.wiredvoltage.com.

    #1480310

    supportbot
    Member

    The blog you specified at http://www.wiredvoltage.com does not appear to be hosted at WordPress.com.

    This support forum is for blogs hosted at WordPress.com. If your question is about a self-hosted WordPress blog then you’ll find help at the WordPress.org forums.

    If you don’t understand the difference between WordPress.com and WordPress.org, you may find this information helpful.

    If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.

    This is an automated message.

    #1480317

    timethief
    Member

    That site is not a free hosted WordPress.com blog. We provide support only for free hosted WordPress.COM blogs being hosted right here on this multiuser blogging platform. You are posting to the wrong support forum.

    WordPress.com and WordPress.org have different log-ins and run different versions of themes with same names. If you don’t have a username account at WordPress.ORG click http://wordpress.org/support/ and register one on the top right hand corner of the page that opens, so you can post to the support forums there and receive advice from WordPress.ORG bloggers.

The topic ‘Fatal error:’ is closed to new replies.