Support » Theme: GeneratePress » .widget font-size set to 0

  • Resolved joost de keijzer


    I’m using the basic version of GeneratePress.

    After changes to /inc/add-ons/typography.php the css for .sidebar .widget, .footer-widgets .widget is set to { font-size: 0px; } effectively hiding some widget content for me.

    In generate_font_css() the $generate_settings are “incomplete”, eg. the “widget_content_font_size” parameter is missing. That is resulting in the zero px fontsize.

    	$generate_settings = wp_parse_args( 
    		get_option( 'generate_settings', array() ), 
    		generate_get_default_fonts( true ) 

    (add true parameter to generate_get_default_fonts()) Helps, but I don’t know any side effects.

    Other option is to test for the keys before the add_property calls.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Leo


    Hi there,

    Sorry what are you trying to do? Hide the footer widgets?

    If so try Customizer > Layout > Footer > Footer Widggets > 0.

    Let me know.


    Thanks for the quick reply.

    I have invisible footer widgets because, after a GeneretePress update, the font-size became 0px.

    v1.3.29 works fine, v1.3.46 the footers appear empty

    I would say it’s a bug.



    Sorry I’m not sure what invisible footer widgets meant? Are you able to provide a link to your site so we can see the problem?

    Did you edit the theme’s core file? We haven’t had any reports on this.

    Let me know.

    • This reply was modified 3 years, 6 months ago by Leo.

    I haven’t changed any core files, I did create a child-theme, but not changing any of these settings.

    I’ve fixed my issue on de live site using some custom CSS, so it’s not visible online any more.



    Can you still provide the link to the site?

    We should be able to tell what CSS you’ve added and if it was indeed a bug.


    The site is

    The issue is with the right footer widget (it’s a quote).

    In eg. FireFox dev tools, select the aside.widget and inspect the font-size css.

    I see:

    in inline:7 font-size is set to 17px (that’s my fix)
    in inline:3 font-size is set to 0px (that’s GeneratePress, I’ve run through the code).




    Looks like the 0 is from the change that you mentioned in the first post?

    After changes to /inc/add-ons/typography.php the css for .sidebar .widget, .footer-widgets .widget is set to { font-size: 0px; } effectively hiding some widget content for me.

    I can still see GP’s original setting at 17px. It just got overwritten by the change you made above I think.

    You are right!

    The child theme is hooking into the generate_font_option_defaults filter, but in my code I was searching for the (new) font_option key widget_content_font_size, so I didn’t find it :-/

    Thanks for the support, sorry for the inconvenience…



    All good! Glad it’s working now.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘.widget font-size set to 0’ is closed to new replies.