-
AuthorPosts
-
March 25, 2015 at 9:44 am #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.
March 25, 2015 at 12:51 pm #417707Hi 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ünterMarch 25, 2015 at 1:20 pm #417719This reply has been marked as private.March 25, 2015 at 2:05 pm #417732Hi!
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ünterMarch 25, 2015 at 3:14 pm #417775This reply has been marked as private.March 25, 2015 at 4:27 pm #417870Hi!
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ünterApril 3, 2015 at 4:07 pm #423130This reply has been marked as private.April 4, 2015 at 8:35 am #423406Hi!
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 -
AuthorPosts
- The topic ‘Where can I change the default sidebar?’ is closed to new replies.