Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #417627

    The Default Sidebar is showing all pages of the site. Where can I can change the settings of the Default Sidebar?

    I know, that I can use other sidebar, that I crated by myself. But some Plugins or 404 Pages are using blank pages to overwrite it with their own datas and there appears the Default Sidebar….

    Thanks for answering.

    #417707

    Hi Holger!

    Thank you for using our theme.

    You can remove parts of the default sidebar with filter hooks (look at enfold\sidebar.php line 81 – 83).

    In functions,.php of the parent theme (or child theme) put something like that to remove:

    
    add_filter( 'avf_show_default_sidebar_pages', 'remove_default_sidebar_pages', 10, 1);
    
    function remove_default_sidebar_pages( $show ) 
    {
    	return false;
    }
    

    I will add an action call for the next update to allow adding other sidebars:

    
                             //	customize default sidebar and add your sidebars
    			 do_action ('ava_add_custom_default_sidebars');
    

    You can use then, e.g.:

    
    add_action( 'ava_add_custom_default_sidebars', 'add_my_default_sidebar', 10);
    
    function add_my_default_sidebar() 
    {
    	dynamic_sidebar('Displayed Everywhere');
    }
    

    Cheers!
    Günter

    #417719
    This reply has been marked as private.
    #417732

    Hi!

    Leider gibt es dafür keine Option zum Einstellen.

    Der obige Code gehört NICHT in Quick CSS sondern ans Ende der Datei enfold\functions.php oder enfold-child\functions.php, falls Du ein Child theme verwendest.

    Um die Default sidebar komplett ohne Inhalt anzuzeigen, verwende:

    
    add_filter( 'avf_show_default_sidebars', 'remove_default_sidebars', 10, 1);
    
    function remove_default_sidebars( $show ) 
    {
    	return false;
    }
    

    Das ist das einfachste.

    Wenn Du nur einzelne Teile nicht anzeigen möchtest, dann obigen Code nicht verwenden.

    Wenn Du z.B. nur die Pages nicht anzeigen möchtest, dann den folgenden Code verwenden:

    
    add_filter( 'avf_show_default_sidebar_pages', 'remove_default_sidebar_pages', 10, 1);
    
    function remove_default_sidebar_pages( $show ) 
    {
    	return false;
    }
    

    Wenn keine Kategorien:

    
    add_filter( 'avf_show_default_sidebar_categories', 'remove_default_sidebar_categories', 10, 1);
    
    function remove_default_sidebar_categories( $show ) 
    {
    	return false;
    }
    

    Wenn kein Archiv:

    
    add_filter( 'avf_show_default_sidebar_archiv', 'remove_default_sidebar_archiv', 10, 1);
    
    function remove_default_sidebar_archiv ( $show ) 
    {
    	return false;
    }
    

    Hoffe, das hilft Dir weiter.

    Cheers!
    Günter

    #417775
    This reply has been marked as private.
    #417870

    Hi!

    Danke für das feedback.

    Bei mir in der Testumgebung funktioniert der Code. Zur Sicherheit nochmals:

    
    add_filter( 'avf_show_default_sidebars', 'remove_default_sidebars', 10, 1);
    
    function remove_default_sidebars( $show ) 
    {
    	return false;
    }
    

    Achte darauf, dass dieser Code nur einmal in der Datei functions,php vorkommt (und entferne auch den Code vom Beginn dieses Posts aus QuickCSS, falls er dort noch drinnen sein sollte)

    Welche Fehlermeldung bekommst Du?

    Best regards,
    Günter

    #423130
    This reply has been marked as private.
    #423406

    Hi!

    If you have any additional questions at this time we kindly ask that you open them up in a separate thread. The longer threads get in the forum, they become more difficult to support as they tend to drift off topic and they also make it troublesome for users trying to search for solutions. Keeping threads relevant to their original inquiry ensures that we can keep better track of what has been resolved and that users can more effectively find answers to similar issues they might be experiencing.

    Thanks!

    Best regards,
    Ismael

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Where can I change the default sidebar?’ is closed to new replies.