• Resolved osully

    (@osully)


    Hi,

    I am getting this error in the error log.

    PHP Notice: register_sidebar was called incorrectly. No id was set in the arguments array for the “404” sidebar. Defaulting to “0”. Manually set the id to “0” to silence this notice and keep existing sidebar content.

    I have tried deleting the 404 sidebar but I can’t to that. How can I manually change the id to something else?

    Thanks for your help!
    Steve

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Nick C

    (@modernnerd)

    Hi, @osully.

    You can assign an ID by editing the ss-settings row in the wp_options database table: https://github.com/copyblogger/genesis-simple-sidebars/issues/27

    The process looks like this:

    1. Take a full site and database backup.

    2. Using phpMyAdmin or another database manager, browse to the wp_options table.

    3. Look for the row with an option_name of ‘ss-settings’.

    The option_value column will contain a serialized array that looks similar to this:

    a:2:{i:0;a:2:{s:4:"name";s:11:"New Sidebar";s:11:"description";s:0:"";}s:17:"custom-sidebar-id";a:2:{s:4:"name";s:14:"Custom Sidebar";s:11:"description";s:4:"Test";}}

    Sidebars with a missing ID will be prefixed by i:0;.

    You’ll need to replace that i:0; with a string to give the sidebar an ID, like this:

    a:2:{s:9:"delete-me";a:2:{s:4:"name";s:11:"New Sidebar";s:11:"description";s:0:"";}s:17:"custom-sidebar-id";a:2:{s:4:"name";s:14:"Custom Sidebar";s:11:"description";s:4:"Test";}}

    In this example, I changed i:0; to s:9:"delete-me";. The ‘9’ must match the number of characters in the string (“delete-me” in this case). It doesn’t matter what ID you use as long as it’s unique — you can use the same delete-me ID in this example if you wish.

    After saving these changes to your database, you’ll then see a ‘delete-me’ ID next to your sidebar name in WordPress at Genesis → Simple Sidebars. You’ll be able to delete that sidebar (and recreate it with an ID if you wish).

    If you make a mistake editing the database, your WP admin area may become inaccessible. You can restore from your database backup in this case.

    Thread Starter osully

    (@osully)

    Thank you so much, Nick.

    I’ll see if I can implement this without breaking everything. ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to Manually Set Sidebar ID’ is closed to new replies.