Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1351401

    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:

    my widgets in my sidebar

    to see website (under development) please insert ” (Email address hidden if logged out) ” here: https://www.toscanamedica-rivista.it/

    #1351480

    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

    #1351503

    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:

    • This reply was modified 2 years, 5 months ago by niguli.
    #1351627

    Hi,

    Glad to know that the modification is working. Did you install a widget logic plugin? You might have adjusted the visibility of the widgets and set them to only display on a specific page.

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.