[Support request] Feature Request : "Create Widget Area" addition to GP Hooks

Home Forums Support Feature Request : "Create Widget Area" addition to GP Hooks

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #324794
    Benjamin

    Hey Tom,

    I often need to add a widgetized are to a GP Hooks.

    Right now I’m doing it manually, i.e. I need to :

    1) Add a code snippet like that using the code snippets plugin:

    function gpwidg_generatepress_widgets_init_below_title() {
    
    	register_sidebar( array(
    		'name'          => 'GP Below Post Title',
    		'id'            => 'below_post_title_gp1',
    		'before_widget' => '<div>',
    		'after_widget'  => '</div>',
    		'before_title'  => '<h2 class="wiget-title">',
    		'after_title'   => '</h2>',
    	) );
    
    }
    add_action( 'widgets_init', 'gpwidg_generatepress_widgets_init_below_title' );

    2) Call the created sidebar in the GP hook like that :

    <?php if ( is_active_sidebar( 'below_post_title_gp1' ) ) : ?>
    	<div id="primary-sidebar" class="primary-sidebar widget-area" role="complementary">
    		<?php dynamic_sidebar( 'below_post_title_gp1' ); ?>
    	</div><!-- #primary-sidebar -->
    <?php endif; ?>

    It’s slightly overkill.

    Could you please just add a checkbox to GP Hooks which would do just the same ?

    Here is how I see it :

    https://screencast.com/t/gQw6Aj6Yr

    This would make a GREAT addition to the premium version.

    It should be quite easy to do too.

    Let me know if the request is unclear.

    Cheers,

    PS: I suspect you didn’t widgetize all hooks from the start for better performance, right ?

    GeneratePress 1.3.46
    GP Premium 1.3
    #324854
    Sandee

    There’s a great plugin that does this easily — GeneratePress Extender by CobaltApps. I don’t have this particular plugin, but I have a few of their other products, and they are very well coded and easy to use. There’s a PHP builder that makes coding new widget areas quick and painless, so you should check it out.

    https://cobaltapps.com/downloads/gp-extender-plugin/

    Not a salesperson for them, but the developer, Eric Hamm, is a great guy. A lot like Tom, honest and hardworking, and I feel good recommending his stuff!

    #324866
    Benjamin

    Thanks Sandee, yeah I know Eric and Cobalt and I’ve been a long time user of Catalyst & Genesis DWB.

    I just refuse to add a plugin just for such a simple function.

    GP already covers 99% of all my needs, I’m not gonna add a plugin just to add that 1% if the lead developer of GP understand my need and how it would help its users.

    Cheers,

    #324892
    Leo
    Staff
    Customer Support

    Widget shortcode is a good option:
    https://en-ca.wordpress.org/plugins/widget-shortcode/

    Using a well coded plugin won’t slow down your site. If we add everyone’s requests to GP then it will become bloated and slow. Code is code so it’s either in the theme or it’s in the plugin.

    #324898
    Benjamin

    If we add everyone’s requests to GP then it will become bloated and slow.

    Well if you had read my request you would probably have seen that it did make lot of sense and that it’s likely to be a feature a tons of users will need.

    Also it won’t add any overhead since only the needed widgetized area will be created.

    Now if you don’t want to make any improvement to that product, it’s up to you…

    Hopefully Tom will have a look and it won’t just get completely ignored as your answer highly suggest it’ll be.

    #324903
    Leo
    Staff
    Customer Support

    We haven’t had tons of requests on this. And the people that did are satisfied with the Widget Shortcode plugin solution.

    Don’t need to be that aggressive. I’m not trying to ignore your suggestion – We are always looking to improve the products and welcome the suggestions.

    All I’m saying is that there is a really good solution out there that a lot of people are using already 🙂

    He will look at the post for sure.

    #324911
    Benjamin

    Yeah sorry if I was a bit harsh, your answer looked a bit like “this look like a crappy request that I’m going to ignore just because plugin XYZ could more or less do the trick”.

    The Widget Shortcode plugin that is almost always pushed when someone post a request similar to mine (I found similar requests many times) is far from satisfactory… you end up with all your widget in an “Arbitrary” placeholder on the widget configuration page, good luck finding out what widget content goes in what hook using that.

    On the other side, it should be pretty easy to add that in a clean and easy fashion inside GP.

    #324929
    Tom
    Lead Developer
    Lead Developer

    I’m not sure I understand.

    So, if someone were to check that checkbox, it would turn that hook into a widget area in “Appearance > Widgets”?

    #325051
    Benjamin

    @Tom yes exactly! If you see my code above it just creates a widgetized area inside the hook.

    Sometimes using just the Hook is enough and probably better for performance. (I’m tempted to believe that you didn’t turn all hooks into widgets for performance reasons).

    Sometimes, if you plan to use lots of logic inside your hook content, you will be very tempted to turn that hook content into a widgetized area and use a plugin such as Widget Logic instead of writing tons of line of PHP conditions that aren’t easily maintainable.

    #325061
    Tom
    Lead Developer
    Lead Developer

    Huh, interesting concept. Thanks for this, I’ll definitely consider it 🙂

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