• Resolved pritchs

    (@pritchs)


    I created a custom field in the Advanced Custom Fields plugin which I am using in a custom post type (call it XYZ) created with CPT UI. When I had everything running correctly, I deleted the test posts that had that custom field associated with them. I’m using the Filter Everything plugin to filter posts in the XYZ archive and the test values I used in that custom field when I created the posts are still showing up in the filter list.

    I hope that makes sense.

    What I am looking for is where I might find those values to delete them. I can’t find them in the database and I’m concerned that if I do find them and delete them I might crash the site.

    Any suggestions would be appreciated. Thanks in advance!
    Steve P

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter pritchs

    (@pritchs)

    OK, as inevitably happens, I found at least part of the answer to my question as soon as I posted the question. The old values are in the “options” table and the “post_meta” table.

    So, now I need to know if I can just delete those records or if I need to do something more complicated.

    Steve P

    • This reply was modified 2 years, 6 months ago by pritchs.
    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    A bit strange that they didn’t get deleted with the test data, at least depending on the deletion method.

    For example if you were using the WordPress UI to delete things, it should have cleaned all this up. However, if you did something like MySQL commands to delete the posts, then that wouldn’t have taken custom field values out as well.

    Worst case, I’d say take a quick backup of things, and delete the no-longer-needed values. In case they are in fact important, you can restore and regain.

    Thread Starter pritchs

    (@pritchs)

    I used the WordPress UI to delete the test posts. I too expected them to go away. I’m way too rusty in my SQL to go after something that way.:)

    I was hoping to avoid the old “try it and restore from backup if it blows up”. ??

    I’ll give it a shot and see what happens.

    Thanks
    SP

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I believe you should be fine to remove those items, unless critical functionality was built around the post meta values, which is not a common thing from my experiences.

    Thread Starter pritchs

    (@pritchs)

    I removed them first on a staging site and after that backed up and deleted them on the live site. No negative behavior so far.

    Weird thing though. I had five “contributors”, four of which I wanted to get rid of. One was my first and last name which I wanted to keep, three were nonsense names and the last was my first name. The nonsense names were removed easily but my first name only contributor has withstood all of my attempts to get rid of it. I can live with that, but it is curious how removing the same records that got rid of the nonsense names didn’t work with my first name only contributor.

    Thanks for the responses. Much appreciated.
    Steve P

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Hard to say really, at least from my perspective. Wish I had better answers on that front.

    Thread Starter pritchs

    (@pritchs)

    This could potentially be due to creating the custom post types etc. on a staging site and then moving it to the live site. Something might have gotten messed up in the transfer. I should have deleted the posts in the staging site before the move.

    I’ll still play with it on the staging site and see if I can get rid of the stubborn thing w/o making things worse.

    SP

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Unused categories still show after post deleted’ is closed to new replies.