WordPress.org

Support

Support » Plugins and Hacks » Random Post Thumbnail » [Resolved] Random Post Thumbnail can't be deleted/undone

[Resolved] Random Post Thumbnail can't be deleted/undone

  • Dana

    @danaparkinson

    I installed this plugin to test it and it is not what I’m looking for. I wanted to be able to install 4 random post thumbnails on a specific page, without the excerpt. If you can suggest the rigth one, I’d appreciate it. So far, I can only find the ones that offer widget options and then this one, Random Post Thumbnail. I activated the plugin, went to Tools and selected for the plugin to add the random thumbnails to pages, thinking it would lead to more options and then a shortcode. Instead, it added the thumbnail to all pages and cannot be undone. I have deactivated and then deleted the plugin and cannot get rid of the thumbnails on the pages that were added. How can I erase this? My site is now unuseable and it is supposed to be launched tomorrow. It seems it has left code behind somewhere. I have tried viewing in a new browser, have cleared cache and the thumbnail persists, at the top of each page.

    http://wordpress.org/extend/plugins/random-post-thumbnail/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author JohnnyPea

    @johnnypea

    Unfortunately thumbnails added through my plugin cannot be easily “deleted/undone” through the plugin interface or by deactivating it. It already assigned the image IDs as posts featured images so we have to delete this relations in database. You can use this SQL query to deassign ALL the featured images from your PAGES (it will NOT delete the images itself!):

    DELETE a FROM wp_postmeta a INNER JOIN wp_posts b on a.post_id = b.ID WHERE a.meta_key = '_thumbnail_id' AND b.post_type = 'page'

    (You can run this SQL query from your phpMyAdmin.)

    Dana

    @danaparkinson

    Thanks for the feedback.

    This is the error I get in PHPmyAdmin. I had selected wp_postmeta then SQL

    #1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘'_thumbnail_id' AND b.post_type = 'page&#039’ at line 1

    I also executed it without selection the specific file.

    Plugin Author JohnnyPea

    @johnnypea

    Have you copied it exactly at it is here?

    Pastie: http://pastie.org/3753246
    Raw: http://pastie.org/pastes/3753246/text

    What is your version of MySQL?

    Dana

    @danaparkinson

    How can I find out. I’ve clicked all that looks appropriate but don’t know where to find the version. Please post your email address so that we can manage this outside the forum.

    Dana

    @danaparkinson

    Here is some info I found on the export file.

    — phpMyAdmin SQL Dump
    — version 2.6.4-pl3
    http://www.phpmyadmin.net

    — Host: dbcx.db.1and1.com
    — Generation Time: Apr 08, 2012 at 09:46 PM
    — Server version: 5.0.91
    — PHP Version: 5.3.3-7+squeeze8

    Dana

    @danaparkinson

    Thank you, it worked when I copied it from Pastie.

    Plugin Author JohnnyPea

    @johnnypea

    I am glad it finally worked. Please could you set this topic as “resolved” (right sidebar), thanks.

    hi i am experiencing the same problem, have installed this plugin but realized not for my purpose

    how can i delete this completely as i tried the query but comes up with an error

    [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘\\\’_thumbnail_id\\\’ AND b.post_type = \\\’page\\\” at line 1]
    DELETE a FROM wp_postmeta a INNER JOIN wp_posts b on a.post_id = b.ID WHERE a.meta_key = \\\’_thumbnail_id\\\’ AND b.post_type = \\\’page\\\’

    Hi JohnnyPea . I have some problem. I cannot delete the images. Please help me. When i paste in the SQL database says to me: 0 rows deleted. ( Query took 0.0008 sec )

    But why? Please so much help me. Thanks.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Resolved] Random Post Thumbnail can't be deleted/undone’ is closed to new replies.
Skip to toolbar