Support » Plugin: amr shortcode any widget » Changing the widget ID

  • Hi there,

    This plugin is amazing! but, I’m in need of your help…

    I have the shortcode [do_widget id=text-7] in almost every page of my website, and I have accidently deleted it. (this would take more than a day’s work to change the shortcode ID…)

    After refreshing the database as much as I could, I cannot get it to start back below [do_widget id=text-16] when I make a new widget due to my other widgets… none of them are [do_widget id=text-7] and many other widgets have duplicated IDs but are different widgets, (note that none of them are text widgets…)

    **The question is, how can I manually change the ID of a widget? manually override and make: [do_widget id=text-7] ? I imagine I can use PhpMyAdmin, as I have done this with categories IDs for other plugins, but I cannot find it for this widget anywhere…

    Please help. 🙁

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author anmari

    (@anmari)

    unpredictable things happen when a text id is changed. Try it on a test site. Te text widgets are stored in an option ‘widget-text’ See https://i.imgur.com/WuMtX6K.jpg.

    When there was only 1 text widget and i changed it to the id of a previously deleted widget then it put the widget inti ‘inactive’ – good.
    BUT if I changed the first in the array to a previously deleted – it ‘lost’ one of the widgets.

    YOu could try a search and replace (after testing on test site and doing backups) on the posts table.

    There is search and replace help: https://www.google.com/search?client=firefox-b-d&q=wordpress+search+and+replace+shortcodes

    HOWEVER if this is text that is appearing on almost every page, then surely one must ask whether there is a better way. EG: can you add a filter to the pages that would normally have that text? to add once to the content?

Viewing 1 replies (of 1 total)
  • The topic ‘Changing the widget ID’ is closed to new replies.