Fatal Error
-
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 https://www.wiredvoltage.com.
- The topic ‘Fatal Error’ is closed to new replies.