• I am using rss-just-better plugin, I want to fetch the results from database that are stored for the widget of this particular plugin, I am able to see the data in wp_options table for widget_rs-just-better plugin in option_name, but the data is stored for the plugin is serialized in the table, I want to fetch the filters that I have specified in the widget and send the filters over the API for mobile.Please hep me out to fetch the url and filters specified in the plugin widget

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    The get_option() function might be what you’re looking for. https://developer.ww.wp.xz.cn/reference/functions/get_option/

    Moderator bcworkz

    (@bcworkz)

    karimeo is correct, you want get_option(). If you print_r the returned array inside of <pre> tags, the array structure and values will be displayed, which will indicate how you access your filter and any other values within the array.

    • This reply was modified 9 years, 1 month ago by bcworkz. Reason: pre tag is code
    Thread Starter namrata26

    (@namrata26)

    Karimeo , bcworkz- thanks for the reply
    I have tried get_option function but with get_option(‘widget_rss-just-better’)
    I get this result
    “Array
    (
    [_multiwidget] => 1
    )
    null”
    following is the data , I want to get
    http://prntscr.com/f1pqd1
    which get_options is not returning, can you please guide me further

    • This reply was modified 9 years, 1 month ago by namrata26.
    Moderator bcworkz

    (@bcworkz)

    The ‘a:1:{s:12:”_multiwidget”;i:1;}’ you see is exactly the serialized version of ‘array(‘_multiwidget’ => 1,)’ (not sure where the null came from) The data you seek must lie elsewhere. Perhaps try searching the values for a string you would expect to find. Or search other option keys for ‘%rss-just-better%’ or maybe ‘%rjb%’.

    Perhaps look through the widget code and see where it is saving the data you provided?

    Sorry my previous post was mis-formatted. I’ve repaired it, but it probably doesn’t matter much at this point.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Get data from database for a widget’ is closed to new replies.