Doesn’t work using get_sidebar() in custom function
-
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
-
Normally that should work.
get_sidebar()is function called in nearly every theme, without any errors. Are the scheduler settings right?Yes, they are right. The relevant widgets aren’t displayed on other pages in the sidebar.
The custom function with
get_sidebar()resides within another plugin.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?
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.
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
Could the order in which the plugins are loaded be the key?
I do not think so but I have no clue.
Could it be because the sidebar is on a page like this?
http://www.example.net/wp-admin/admin-ajax.php?action=...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.
-
This reply was modified 9 years, 7 months ago by
The topic ‘Doesn’t work using get_sidebar() in custom function’ is closed to new replies.