Archived topic
Choose Box Layout on Responsive
1 reply · Started by Anonymous on September 10, 2015
I am writer and I am writing about WordPress at my website. Going to write about GeneratePress (I going to use it on my website too)
As sometime a full width seem too big for some website or some language. a long role of words make site more difficult to read. Example Thai.
When I looking for the theme I always check if they can still show sidebar on iPad mini screen ( or around 768 pixel ) So the content will not too wide and we can still show them the sidebar. This is also still see on many of Magazine or News website.
Maybe we can add this option to some addon maybe in Blog content section to choose to Show or Hide Sidebar on Mobile << This is exactly what I want. I seen this option from Beaver Builder that we can control the multi column of content on Page.
I am going to change theme and I still going for GeneratePress but I would ask you for help to do this, May you?
Thank you very much.
Emily
Hi Emily,
You can actually use our built in filters to change the sidebar width on tablets:
add_filter( 'generate_right_sidebar_tablet_width','generate_right_sidebar_custom_width' );
function generate_right_sidebar_custom_width()
{
return '25';
}
add_filter( 'generate_left_sidebar_tablet_width','generate_left_sidebar_custom_width' );
function generate_left_sidebar_custom_width()
{
return '25';
}
25 is 25% width.
Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/
Let me know if that does what you're after :)
