Bootstrap and WP-user forms

This topic contains 3 reply and 2 voices, and was last updated by Tareq Hasan 10 years, 11 months ago
Viewing 3 Posts - 1 through 3 (of 3 total)
Author Posts
December 14, 2013 at 7:26 pm 13711
Tareq Hasan Hi, Using bootstrap, how can I add the needed classes and remove yours in the "add new post form" ? An override ? A filter function ? What I have :
<li class="wpuf-el one">
<div class="wpuf-label">
<label for="wpuf-one">
Select
<span class="required">*</span>
</label>
</div>
<div class="wpuf-fields">...
What I need :
<div class="form-group">
<label for="thelabel">My label</label>
<input type="text" name="name" id="name" class="input form-control" value="value" placeholder="theplaceholder" />
</div>
EDIT: Adding the class to the field in wp form doesn't work because it add it to the li and not to the input field. Reading render-form.php, it looks like I need to filter all fields. Do you have an idea on how to ? Can you share an example ?
December 14, 2013 at 7:50 pm 13714
Tareq Hasan Tareq Hasan

There is no other way except editing the plugin code. But I wouldn’t suggest doing that as you’ll lose the changes if any plugin update comes.

It’ll be better to add custom CSS to your theme and style the form.

December 14, 2013 at 8:58 pm 13715
ced ced

Is there any filter action like in wordpress ? Something like:

add_filter('wp_nav_menu_main_items','login_function', 10, 2);
	function login_function( $nav, $args ) {
		return $nav.'<li class="menu-item menu-item-login"><a class="btn btn-success" href="#login" role="button" data-toggle="modal">Login</a></li>';
			return $nav;
		   }
		return $nav;
	}
December 15, 2013 at 1:16 pm 13726
Tareq Hasan Tareq Hasan

Take a look here http://www.wpbeginner.com/wp-themes/how-to-add-custom-items-to-specific-wordpress-menus/

Viewing 3 Posts - 1 through 3 (of 3 total)