- This topic has 7 replies, 2 voices, and was last updated 6 years, 3 months ago by Leo.
-
AuthorPosts
-
December 30, 2017 at 2:27 am #459806Janeen
I am using Sidebar/Content/Sidebar. Can someone please tell me the best way to make both sidebars smaller and the main content section larger on a single page? I have been searching everywhere and I can’t find either a css code or where in layout I can do this without effecting the whole site. Thank you!
December 30, 2017 at 5:44 am #459885LeoStaffCustomer SupportHi there,
This should help: https://docs.generatepress.com/article/sidebar-widths/#using-a-filter
January 19, 2018 at 12:06 pm #475152JaneenHi Leo, Thank you for your time and response. I did come across this answer while searching on my own but unfortunately it makes no sense to me. I don’t know how to use PHP filters and then when I clicked on “how to use PHP filters” it talked about downloading a Code Snippets plug-in – which still didn’t clearly explain how to use PHP filters with the plug-in. All it did was scare me about how easily I could screw up my site if I did it wrong.
I did want to change both sidebars to make them smaller and I want to make the main content space larger on one single page. I did come across a simple css code in the forum that explained how to do one sidebar – I was just hoping for a simple css code that included the code for sidebar – content – sidebar – where all I had to do was change the percentages and put it on the bottom of that page in the Simple CSS box.
Sorry – as you can tell I am somewhat of a novice who has unfortunately broken my websites in the past and am now a little shy when messing with functions.php. Thanks! Sincerely Janeen
January 19, 2018 at 7:31 pm #475337LeoStaffCustomer SupportWhich single page would you like to adjust that?
January 20, 2018 at 7:24 am #475667JaneenHi thanks again for your time for getting back to me. I want to literally change the main page Newmandelaeffects.com. I simply want to make that page that shows latest posts larger in the center and make both sidebars smaller. Thank you again! Sincerely, Janeen
January 20, 2018 at 9:12 am #475745LeoStaffCustomer SupportFor front page, your code would be:
add_filter( 'generate_right_sidebar_width','lh_home_page_custom_right_sidebar_width' ); function lh_home_page_custom_right_sidebar_width( $width ) { // If we're on the home page if ( is_front_page() ) { return 20; } // Return the default return $width; } add_filter( 'generate_left_sidebar_width','lh_home_page_custom_left_sidebar_width' ); function lh_home_page_custom_left_sidebar_width( $width ) { // If we're on the home page if ( is_front_page() ) { return 20; } // Return the default return $width; }
You should only need to edit the return number. Then copying and pasting into Code Snippets should work.
January 21, 2018 at 6:34 am #476274JaneenDear Leo,
Thank you so much!!!
January 21, 2018 at 2:03 pm #476634LeoStaffCustomer SupportNo problem 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.