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.

Is there a way to hide the Twenty Eleven theme from the "Themes" page in wordpress? I have 10 themes for clients to choose from and i don't want them to be able to see the Twenty Eleven theme or be able to accidentally activate it. All of the other themes are children themes of twenty eleven, so deleting it isn't an option. Any ideas? Thanks!

share|improve this question
add comment

1 Answer 1

I'm no expert but I don't know of any php way to do it ... This is a long shot which you'd need to try out, but could you use css or jquery to target the first child or nth child of #availablethemes in the admin css and set it to display:none. I don't know how wordpress sets the order of the themes so that's why I'm saying you'd need to experiment, but it might be your only option, unless someone knows of a more elegant way.

share|improve this answer
    
Thanks for replying! This was my 1st thought, to simply hide it with css, but the Twenty Eleven Theme doesn't have it's own specific id or class wrapped around it. It looks like Wordpress orders the themes alphabetically, but not sure how that would help me target the Twenty Eleven theme. –  Tory May 18 '12 at 16:27
    
well it's just if you always knew it was in a particular position you could use nth child ... elegant and stable it isn't though because if you or a client add a new child theme, or of wordpress bring out twenty twelve or something it breaks. –  byronyasgur May 18 '12 at 16:33
    
Well, your idea worked. But, I agree, not sure if it's the best way to go. I'll use it for now and hopefully somebody will chime in with a better way. I appreciate your help! –  Tory May 18 '12 at 17:01
2  
A better method would be to use jquery div:contains to check for the text in the preview link stylesheet=twenty_eleven , and then select and hide that .available-theme div block. –  Wyck May 18 '12 at 17:59
add comment

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.