Black Friday Sale! Get up to $30 off GP Premium! Learn more ➝

[Resolved] 3 Footer Widgets with different widths

Home Forums Support [Resolved] 3 Footer Widgets with different widths

Home Forums Support 3 Footer Widgets with different widths

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

    Trying to achieve something like this at the bottom:
    http://socialtriggers.com/perfect-content-width/

    Have you used the code at the bottom here:
    https://generatepress.com/knowledgebase/choosing-footer-widgets/

    Tried this but it messes up the layout

    add_filter( 'generate_footer_widget_1_width','generate_custom_footer_1_width' );
    function generate_custom_footer_1_width()
    {
    
     	// Return the percentage of this widget width - 25% in this case
     	return '60';
    
     }
    
    add_filter( 'generate_footer_widget_2_width','generate_custom_footer_2_width' );
    function generate_custom_footer_2_width()
    {
    
     	// Return the percentage of this widget width - 25% in this case
     	return '20';
    
     }
    
    add_filter( 'generate_footer_widget_3_width','generate_custom_footer_3_width' );
    function generate_custom_footer_3_width()
    {
    
     	// Return the percentage of this widget width - 25% in this case
     	return '20';
    
     }
    

    Even when entering 34/33/33 => layout gets messed up vs when this code is not present. The third widget is shoved under widget1/2.

    Also tried to define 5 widgets using the above code (even only two widgets are active). But then defining 50/25/25/0/0. This doesn’t work either, same issue.

    How to do this?

    #244424
    sl3439gdlc39

    found it, nevermind πŸ™‚

    #244439
    Tom
    Lead Developer
    Lead Developer

    Glad you got it working πŸ™‚

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