wpsnoop Fatal error: Cannot redeclare get_current_post_type()

If you are dealing with a WordPress issue where a PHP Function get_current_post_type() was already declared it is most likely due to a plugin/theme conflict.

wpsnoop scanned and analyzed over 100,000 WordPress plugins and themes to find and locate potential conflicts including functions that share the same name.

This page has information on the 6 places where that function is declared and used in WordPress plugins and themes.

Note: Our database currently only taps into the free themes and plugins available in the publicly available WordPress plugins and themes, if your site uses paid plugins, themes or custom code there may be additional conflicts.


Our database has uncovered 6 different instances of potential conflicts where different plugins or themes share the function name.

Examples of this error include:

PHP Fatal error: Cannot redeclare get_current_post_type() (previously declared in wp-content/plugins/fraktjakt-shipping-for-woocommerce/fraktjakt-woocommerce-shipping.php:1265)

This file is part of the WordPress plugin Fraktjakt Shipping Method for WooCommerce and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare get_current_post_type() (previously declared in wp-content/plugins/essay-wizard-wpcres/wpcres-shortcode-dropdown.php:49)

This file is part of the WordPress plugin Essay Wizard (wpCRES) and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare get_current_post_type() (previously declared in wp-content/plugins/fixtureslive-hockey-league/fixtures_live_functions.php:17)

This file is part of the WordPress plugin FixturesLive Hockey League Plugin and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare get_current_post_type() (previously declared in wp-content/plugins/cf7-add-to-page/cf7-add-to-page.php:161)

This file is part of the WordPress plugin Contact Form 7: Add to Page and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare get_current_post_type() (previously declared in wp-content/plugins/omfg-mobile/includes/functions.php:49)

This file is part of the WordPress plugin OMFG Mobile Pro and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare get_current_post_type() (previously declared in wp-content/plugins/wp-redirectify/wp-redirectify.php:268)

This file is part of the WordPress plugin Redirectify and could be interacting with another theme or plugin and causing a fatal error.

The error occurs because two (or more) plugins that you are using are both trying to declare a function with the same name.