Skip to content

Instantly share code, notes, and snippets.

@aschweigert
Last active February 3, 2016 02:54
Show Gist options
  • Select an option

  • Save aschweigert/c6fc7db56c2e777ff34a to your computer and use it in GitHub Desktop.

Select an option

Save aschweigert/c6fc7db56c2e777ff34a to your computer and use it in GitHub Desktop.

Revisions

  1. aschweigert revised this gist Feb 3, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion deleting garbage sidebars
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    //safest, just update ones set to the old default
    //least destructive, just update ones set to the old default
    UPDATE wp_43_postmeta
    SET meta_value = 'none'
    WHERE meta_key = 'custom_sidebar' AND meta_value = 'sidebar-single'
  2. aschweigert created this gist Feb 3, 2016.
    12 changes: 12 additions & 0 deletions deleting garbage sidebars
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    //safest, just update ones set to the old default
    UPDATE wp_43_postmeta
    SET meta_value = 'none'
    WHERE meta_key = 'custom_sidebar' AND meta_value = 'sidebar-single'

    //OR set them all to "none"
    UPDATE wp_43_postmeta
    SET meta_value = 'none'
    WHERE meta_key = 'custom_sidebar'

    //OR just delete them all
    DELETE FROM wp_43_postmeta WHERE meta_key = 'custom_sidebar'