WordPress.org

Ready to get started?Download WordPress

Forums

Random Post Thumbnail
[resolved] Random Post Thumbnail can't be deleted/undone (10 posts)

  1. Dana
    Member
    Posted 2 years ago #

    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/

  2. JohnnyPea
    Member
    Plugin Author

    Posted 2 years ago #

    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.)

  3. Dana
    Member
    Posted 2 years ago #

    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.

  4. JohnnyPea
    Member
    Plugin Author

    Posted 2 years ago #

    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?

  5. Dana
    Member
    Posted 2 years ago #

    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.

  6. Dana
    Member
    Posted 2 years ago #

    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

  7. Dana
    Member
    Posted 2 years ago #

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

  8. JohnnyPea
    Member
    Plugin Author

    Posted 2 years ago #

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

  9. dailydeals2india
    Member
    Posted 2 years ago #

    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\\\'

  10. robbyyoz
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic