Tagged: sidebar
hi, I’m probably sinking in a glass of water…
I’ve created a custom sidebar that I recall on my website pages here https://www.toscanamedica-rivista.it/scienza-e-cultura/ for example..
How can I recall my custom sidebar with my custom widgets in the blog’s categories sidebar?
here I have the default widgets: https://www.toscanamedica-rivista.it/categoria/scienza-cultura/ but I want the same custom sidebar named “Toscana medica sidebar” with these widget:
to see website (under development) please insert ” (Email address hidden if logged out) ” here: https://www.toscanamedica-rivista.it/
Hey Nicola,
Thank you for the inquiry.
You can try this filter in the functions.php file.
add_filter('avf_custom_sidebar','avf_custom_sidebar_mod');
function avf_custom_sidebar_mod($sidebar) {
if ( is_archive() ) {
$sidebar = "Toscana Medica Sidebar";
}
return $sidebar;
}
Or just use the same widgets in the Sidebar Blog widget area.
Best regards,
Ismael
Thanks Ismael.
It worked using your custom function.
I still don’t understand why it did not worked setting the widget this way, as you marked above: