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.

I'm using the Sidebar Login script by Mike Jolley, I would like to add a class of "clearfix" to the element tag. I have been unable to find a solution to this so far.

I'd also like to understand any solution given, so if you would like to briefly explain how the function works I'd be very grateful.

share|improve this question
    
Add a link to the plugin’s source code. –  toscho Jun 21 '13 at 10:24
    
add comment

1 Answer

up vote 1 down vote accepted

That plugin does not create a <form> tag itself. It uses wp_login_form to do that, and that function does not provide a way to add a class to the <form> tag. You can see that by looking at the widget method, which is what generates the front end content.

I don't see a way to do what you want to do, but there is an action before the form-- do_action( 'sidebar_login_widget_start' );-- and one after-- do_action( 'sidebar_login_widget_end' );-- that would let you wrap the whole form in some other markup.

However, I very much doubt that you need to add a class to that tag. I would bet that you can do anything you need by writing CSS rules using the existing markup.

share|improve this answer
    
Thank you ever so much for that explanation, I understand now :) And I have just realised how to accomplish what I need - apply the properties of clearfix to form instead of trying to add a class to it.. I do feel silly. I really do appreciate you taking the time to explain this to me. –  Paxjah Jun 21 '13 at 13:57
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.