WordPress.org

Ready to get started?Download WordPress

Forums

WPCandy doesn't work, need alternative to insert text between posts (3 posts)

  1. gamebittk
    Member
    Posted 6 years ago #

    For a while I've been using a plugin called WPCandy to automatically insert adsense code between posts, but in WordPress 2.5, the version I'm using, whenever the plugin is activated i get an internal server error.

    I'm sure there are plugins like this, so I was wondering if someone can point me to a good one. WPCandy is a great plugin, so I hope it gets updated.

  2. digitalfrog
    Member
    Posted 6 years ago #

    Same here...

  3. robespierre
    Member
    Posted 6 years ago #

    I found the solution!

    First: if you are making something and need to deactivate a working WPCandy for some reason, don't do it! (but if you came here, something was messed up...). If you did so, activate it again.

    The WPCandy creates and maintains a nem table in the mySQL database: wp-wpcandy. When you activates it, the table is created. When you deactivate the plugin, the table is dropped. For some reason WP 2.5 don't let it create this table again after the deactivation. The foreach error is a 'i can't find anything in the table' error, 'cause there is no table at all!

    The solution is manually create a new empty table. You will need some SQL admin or a SQL console to send a SQL command like this:

    CREATE TABLE wp_wpcandy
    id INT NOT NULL AUTO_INCREMENT,
    anchor TINYTEXT NOT NULL,
    candy TEXT,
    position TINYTEXT NOT NULL,
    PRIMARY KEY(id);

    I got this one from the WPCandy code, but used a MySQLAdmin from my BlueHost cpanel.

    After you created the table, the WPCandy will work again, and the foreach error will dissapear when you creates a new candy.

    I hope this help! It worked for me!
    Chack at http://www.technewsbr.com

Topic Closed

This topic has been closed to new replies.

About this Topic