[Support request] Widget Area after the Post

Home Forums Support [Support request] Widget Area after the Post

Home Forums Support Widget Area after the Post

  • This topic has 5 replies, 3 voices, and was last updated 5 years ago by Tom.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #574764

    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.

    Customer Support

    Hi there,

    Should be easier to use turn widgets into shortcodes with this plugin:

    Then use them in hooks module.

    Let me know if this helps.


    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.

    Lead Developer
    Lead Developer

    I’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' );

    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.


    Lead Developer
    Lead Developer

    In 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.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.