wpsnoop Fatal error: Cannot redeclare setpostviews()

If you are dealing with a WordPress issue where a PHP Function setpostviews() 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 10 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 10 different instances of potential conflicts where different plugins or themes share the function name.

Examples of this error include:

PHP Fatal error: Cannot redeclare setpostviews() (previously declared in wp-content/themes/knowx/inc/extra.php:255)

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

PHP Fatal error: Cannot redeclare setpostviews() (previously declared in wp-content/plugins/product-sold-count/woo-soldcount.php:32)

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

PHP Fatal error: Cannot redeclare setpostviews() (previously declared in wp-content/plugins/simple-popular-content/popular.php:29)

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

PHP Fatal error: Cannot redeclare setpostviews() (previously declared in wp-content/plugins/wpbase-video/controller/controller.php:37)

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

PHP Fatal error: Cannot redeclare setpostviews() (previously declared in wp-content/plugins/cart-conversion-rate-calculator/cartconversions.php:148)

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

PHP Fatal error: Cannot redeclare setpostviews() (previously declared in wp-content/plugins/wp-easy-post-view/wp-easy-post-view.php:20)

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

PHP Fatal error: Cannot redeclare setpostviews() (previously declared in wp-content/themes/xooblog/inc/template-functions.php:67)

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

PHP Fatal error: Cannot redeclare setpostviews() (previously declared in wp-content/plugins/ultra-companion/inc/theme-functions.php:94)

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

PHP Fatal error: Cannot redeclare setpostviews() (previously declared in wp-content/plugins/job-board-creator/inc/post-counter.php:14)

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

PHP Fatal error: Cannot redeclare setpostviews() (previously declared in wp-content/themes/eblog-lite/spiderbuzz/hooks/eblog-hooks.php:49)

This file is part of the WordPress theme eBlog Lite 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.