Welcome to Rise Forums

Join our fantastic community to connect with like-minded website owners, WordPress users, and online entrepreneurs.

Setting Default "display_header_text" To Null

Discussion in 'WordPress Theme & Plugin Development' started by Steven Gardner, Apr 15, 2016.

Thread Status:
Not open for further replies.
  1. Hi,

    Working on a new theme at the moment and I've come up against a problem I'm struggling to figure out. I hope you can help

    Within the Site Identity section in the customizer is a checkbox option called "Display Header Text".
    [​IMG]


    I can't figure out where in the code I can default this to be unchecked. Its a core option and I've tried a few things that havent worked.

    Inspecting the element, it looks like the customizer setting title is "display_header_text" so I tried adding:
    $wp_customize->get_setting('display_header_text')->default = 'false';

    This didnt work!

    Any help would be great
     
  2. Have you seen the theme core files ? I think it should be there.
     
  3. I'm not a coder, but the tutorial at https://developer.wordpress.org/themes/functionality/custom-headers/ looks like it has the solution.

    Header text #
    By default, the user will have the option of whether or not to display header text over the image. There is no option to force the header text on the user, but if you want to remove the header text completely, you can set ‘header-text’ to ‘false’ in the arguments. This will remove the header text and the option to toggle it.
    :)
     
Thread Status:
Not open for further replies.

Share This Page