Are you having trouble getting Alex King’s Popularity Contest plugin to activate? You are not alone, almost everyone who has tried to use it with a version of WordPress over 2.5 has had a problem.
But there is now a solution.
1. open up popularity-contest.php.
2. Go to line 59.
3. Replace require(’../../wp-blog-header.php’);
with require(’../wp-blog-header.php’);
.
If you have your WordPress in a subfolder then simply add the subfolder name after the ../ part.
You’ll now need to create two MYSQL tables so log in and create the following two tables:
CREATE TABLE IF NOT EXISTS `wp_ak_popularity` (
`post_id` int(11) NOT NULL,
`total` int(11) NOT NULL,
`feed_views` int(11) NOT NULL,
`home_views` int(11) NOT NULL,
`archive_views` int(11) NOT NULL,
`category_views` int(11) NOT NULL,
`single_views` int(11) NOT NULL,
`comments` int(11) NOT NULL,
`pingbacks` int(11) NOT NULL,
`trackbacks` int(11) NOT NULL,
`last_modified` datetime,
KEY `post_id` (`post_id`)
) ENGINE=MyISAM;
CREATE TABLE IF NOT EXISTS `wp_ak_popularity_options` (
`option_name` varchar(50) NOT NULL,
`option_value` varchar(50) NOT NULL
) ENGINE=MyISAM;
I’m assuming you use wp_ as your table prefix, if you don’t then change that otherwise it won’t work.
Then go and activate your plugin and if you followed these steps correctly then it should now work. 🙂
Image by Pete Linforth from Pixabay