- This topic has 5 replies, 2 voices, and was last updated 5 years ago by
Tom.
-
AuthorPosts
-
February 22, 2016 at 8:20 pm #174570
Oleg
Some premium themes you can customize the layout of the left/right/not sidebaer, not only for the blog/page, but also for WooCommerce, BuddyPress, bbPress. Can I do this with GeneratePress?
February 22, 2016 at 11:32 pm #174581Tom
Lead DeveloperLead DeveloperYes, you can use this filter: https://generatepress.com/knowledgebase/choosing-sidebar-layouts/#sidebar-filter
For example:
WooCommerce
add_filter( 'generate_sidebar_layout','generate_custom_woocommerce_sidebar_layout' ); function generate_custom_woocommerce_sidebar_layout( $layout ) { // If we are on a woocommerce page, set the sidebar if ( is_woocommerce() ) return 'both-left'; // Or else, set the regular layout return $layout; }
BuddyPress
add_filter( 'generate_sidebar_layout','generate_custom_buddypress_sidebar_layout' ); function generate_custom_buddypress_sidebar_layout( $layout ) { // If we are on a buddypress page, set the sidebar if ( is_buddypress() ) return 'both-left'; // Or else, set the regular layout return $layout; }
bbPress:
add_filter( 'generate_sidebar_layout','generate_custom_bbpress_sidebar_layout' ); function generate_custom_bbpress_sidebar_layout( $layout ) { // If we are on a bbpress page, set the sidebar if ( is_bbpress() ) return 'both-left'; // Or else, set the regular layout return $layout; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentFebruary 23, 2016 at 12:20 am #174602Oleg
Thank you! I can not help wondering how your theme is flexible and convenient. It is much more complicated than it seems at first glance.
February 23, 2016 at 12:58 am #174614Tom
Lead DeveloperLead DeveloperIt would be nice to have all these options in the customizer but things would get very messy/overwhelming.
Having these filters and hooks everywhere at least makes it so basically anything is possible π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentFebruary 23, 2016 at 1:19 am #174617Oleg
I think your theme somewhere between Genesis and Avada π
February 23, 2016 at 9:37 am #174714Tom
Lead DeveloperLead DeveloperNot a bad place to be! π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.