• 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 http://www.wiredvoltage.com.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Can you just FTP to the server using credentials provided by your hosting provider (possibly DreamHosts)?

    Thread Starter wiredvoltage

    (@wiredvoltage)

    OK great I’m there but when I open:

    WiredVoltage.com/wp-content/themes/ifeature/functions.php

    I get the following pop up message window:

    550 /WiredVoltage.com/wp-content/themes/ifeature/’. get_template_directory_uri() .’/images/home.png: No such file or director

    ???

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Ask your hosting providers to help you with FTP.

    Thread Starter wiredvoltage

    (@wiredvoltage)

    OK thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fatal Error’ is closed to new replies.