• Resolved h-u-g-o

    (@h-u-g-o)


    Hi there!

    I’m using get_sidebar() in a custom function and all widgets are shown up, the time scheduler doesn’t work in that context. What’s the solution?

    Kind regards
    Hugo

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Martin Stehle

    (@hinjiriyo)

    Normally that should work. get_sidebar() is function called in nearly every theme, without any errors. Are the scheduler settings right?

    Thread Starter h-u-g-o

    (@h-u-g-o)

    Yes, they are right. The relevant widgets aren’t displayed on other pages in the sidebar.

    Thread Starter h-u-g-o

    (@h-u-g-o)

    The custom function with get_sidebar() resides within another plugin.

    Plugin Contributor Martin Stehle

    (@hinjiriyo)

    Please set a widget in another widget area for a check (you can remove it after the test). Does the scheduler work in that widget area?

    Thread Starter h-u-g-o

    (@h-u-g-o)

    I’m not sure if I got you right. The scheduler works in the sidebar and also in other widget areas. It only doesn’t work when the sidebar is called within another plugin’s function.

    Plugin Contributor Martin Stehle

    (@hinjiriyo)

    Thank you for your feedback. You have got me stumped. Currently I can not see a difference between calling get_sidebar() in a theme and calling it in your plugin. So at the moment I got no idea where to debug.

    • This reply was modified 9 years, 7 months ago by Martin Stehle. Reason: corrected typo
    Thread Starter h-u-g-o

    (@h-u-g-o)

    Could the order in which the plugins are loaded be the key?

    Plugin Contributor Martin Stehle

    (@hinjiriyo)

    I do not think so but I have no clue.

    Thread Starter h-u-g-o

    (@h-u-g-o)

    Could it be because the sidebar is on a page like this?

    http://www.example.net/wp-admin/admin-ajax.php?action=...

    Plugin Contributor Martin Stehle

    (@hinjiriyo)

    If I read the above URL correctly: In WP a sidebar.php can be loaded via Ajax. So the answer can be “no” but “yes” due to other reasons in this context. I am not an Ajax expert and could not provide any answer. Sorry.

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

The topic ‘Doesn’t work using get_sidebar() in custom function’ is closed to new replies.