Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WordPress: Formulario horizontal con Contacto Form 7 y Bootstrap
<?php
add_action( 'wp_enqueue_scripts', 'frontend_scripts' );
function frontend_scripts()
{
wp_enqueue_script('jquery');
/* Popper & Bootstrap */
wp_enqueue_script('popper', 'https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js', array('jquery'), false, true);
wp_enqueue_script('bootstrap', 'https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.min.js', array('jquery'), false, true);
wp_enqueue_style('bootstrap', 'https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css', false, false);
}
<div class="form-group">
<label for="name" class="col-md-4 control-label">Nombre (obligatorio)</label>
<div class="col-md-8">
[text* your-name class:form-control id:name]
</div>
</div>
<div class="form-group">
<label for="email" class="col-md-4 control-label">Correo electrónico (obligatorio)</label>
<div class="col-md-8">
[email* your-email class:form-control id:email]
</div>
</div>
<div class="form-group">
<label for="message" class="col-md-4 control-label">Mensaje (obligatorio)</label>
<div class="col-md-8">
[textarea* your-message class:form-control id:message]
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
[submit id:send class:btn class:btn-primary "Enviar"]
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment