Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

My theme doesn't use the tag line, how can I remove it from the customizer?

share|improve this question

3 Answers 3

up vote 2 down vote accepted

Late to the party but this will do the trick:

$wp_customize->remove_control('blogdescription');

You want to remove just that control, not entire section as suggested above.

share|improve this answer

I found out the WP_Customize_Manager class has a function called remove_section(). In your function hooked to customize_register you can just do:

    $wp_customize->remove_section('nav');
    $wp_customize->remove_section('static_front_page');

You can find the ID of the section (i.e. 'nav') if you inspect the accordion title bar of the section. Look at the ID of the containing <li> tag and it's the portion of the string after "customize-section-". I.E.:

<li id="customize-section-static_front_page" class="control-section customize-section">

-- the ID is "static_front_page"

share|improve this answer
    
That looks better than my solution so I will give you the tick - I haven't tested it but I suppose you have ... I don't get the title_tagline though - surely it should say static_front_page, is that a typo BAC? –  byronyasgur Aug 24 '12 at 1:29
    
@byronyasgur yep, that was a copy pasta error, fixed now. Thanks! –  jessica Aug 24 '12 at 1:32
    
Actually, this isn't the correct answer. This removes the entire section that contains both the site title & tagline. The question is asking for only the tagline. Look at the answer below by @byronyasgur –  BFTrick Nov 15 '12 at 1:13

Accoring to OTTO

One final thing you can add to a section is a “theme_supports” option. This will make the menu not appear unless the theme supports something. If you’re putting this code in a theme itself, then you already know what the theme supports, so it doesn’t make much sense. The core uses this to not show the header and background options if the theme doesn’t support them.

So I put that together with

    $wp_customize->get_setting('blogdescription')->transport='postMessage';

... and discovered that the following code worked. I put false in for the theme_supports ... not sure what I really should be putting in ... maybe someone a bit more expert can improve on this.

    $wp_customize->add_control('blogdescription')->theme_supports=false;
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.