- This topic has 5 replies, 3 voices, and was last updated 8 years, 5 months ago by
Tom.
-
AuthorPosts
-
November 8, 2017 at 5:53 am #418378
Pradeep
Hello…
I have a developer working on one of my projects and he would like to know if there’s a ‘non-CSS solution’ to change main content from grid-75 to grid-70 and sidebar from grid-25 to grid-30. Please let us know if there’s a way for that.
Apologies for posting a totally unrelated question with that. Is there’s a place within customizer to assign a custom sidebar to a single post template? Or do we have to edit the single.php with our custom sidebar details?
Many thanks in advance.
November 8, 2017 at 8:43 am #418564Leo
StaffCustomer SupportHi there,
You can change the sidebar width in the customizer: https://docs.generatepress.com/article/sidebar-widths/
This plugin should help for page specific sidebar: https://en-ca.wordpress.org/plugins/content-aware-sidebars/
November 8, 2017 at 10:06 pm #419137Pradeep
Thanks Leo! My developer is happy first solution.
Is there any way to add the custom sidebar using hooks as I’d rather avoid adding another plugin? This is how we added it:
function pm_single_post_sidebar() { if (function_exists('register_sidebar')) { register_sidebar( array( 'name' => __('Single Post Sidebar', 'generatepress'), 'id' => 'single-post-side-bar', 'description' => __('Single Post Sidebar', 'generatepress'), 'before_widget' => '<div class="widget-content">', 'after_widget' => "</div>", 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); } } add_action('widgets_init', 'pm_single_post_sidebar');Many thanks in advance.
November 8, 2017 at 11:21 pm #419160Tom
Lead DeveloperLead DeveloperThere’s some sidebar related hooks:
https://docs.generatepress.com/article/generate_after_left_sidebar_content/
https://docs.generatepress.com/article/generate_before_left_sidebar_content/
https://docs.generatepress.com/article/generate_before_right_sidebar_content/
https://docs.generatepress.com/article/generate_after_right_sidebar_content/November 9, 2017 at 1:24 am #419231Pradeep
Thanks Tom! As usual nothing but the best support.
November 9, 2017 at 7:48 am #419644Tom
Lead DeveloperLead DeveloperGlad I could help! 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.