- This topic has 5 replies, 3 voices, and was last updated 5 years ago by
Tom.
-
AuthorPosts
-
May 13, 2018 at 9:28 pm #574764
easiii
Hello,
I got the Premium version of Generatepress.
How can I add a Widget area on the Pages and Single Page (articles) after the content? Please do not referrer me to the GP Hooks or WordPress documentation. If you want to help, just give me the code that I have to add and where to add it.May 13, 2018 at 11:29 pm #574842Leo
StaffCustomer SupportHi there,
Should be easier to use turn widgets into shortcodes with this plugin:
https://en-ca.wordpress.org/plugins/widget-shortcode/Then use them in hooks module.
Let me know if this helps.
May 13, 2018 at 11:37 pm #574845easiii
More plugins? Not what I was looking for. TBH I’ve searched your forums before posting, and I found only canned speeches like the one above. That’s not helpful.
I really don’t understand why you guys didn’t create out of the box an After Posts widget area… I can bet that there are a lot of people who would like that.
Tom, can you help? I need the function or whatever it needs to be added to create an after post widget area… No more plugins suggestions please.
If you don’t know how to do it, or worse don’t want to help… then just let me know and I can browse the WordPress forums and put together the code.
May 14, 2018 at 9:15 am #575326Tom
Lead DeveloperLead DeveloperI’m happy to help. However, what Leo replied with is very helpful. It’s the easiest way to achieve what you’re looking for.
Without a plugin, you would have to:
1. Create a widget area: https://codex.wordpress.org/Widgetizing_Themes#How_to_Register_a_Widget_Area
2. Hook it into the theme:
add_action( 'generate_after_content', 'tu_add_custom_widget_area' ); function tu_add_custom_widget_area() { if ( is_single() ) { dynamic_sidebar( 'home_right_1' ); } }
May 21, 2018 at 4:11 am #580605easiii
Thank you, that worked. Thanks.
One more question, I want to change the mobile view from 768 to 1024 – I’ve found on your forum a few ways to make the menu go into that hamburger layout, however I want to change everything, not just the menu. Basically at 1024, the icon should change to the mobile, and basically all the header be like it is now at 768. And I also want the sidebar to go under the content, exactly how it goes at 768px. Basically I want to change the breaking point from 768 to 1024 for the entire page, not just the header.
Thanks!
May 21, 2018 at 10:20 am #580952Tom
Lead DeveloperLead DeveloperIn that case you’ll need to copy the entire mobile.css file: https://github.com/tomusborne/generatepress/blob/2.1.2/css/mobile.css
Then paste it into your custom CSS, and adjust the media query.
-
AuthorPosts
- You must be logged in to reply to this topic.