This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Mi pagina con Bootstrap</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /> | |
</head> | |
<body> | |
<div class="container"> | |
<!-- Titulo --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="panel panel-primary"> | |
<script> | |
$(document).ready(function() { | |
var max_fields = 10; //maximum input boxes allowed | |
var wrapper = $("#datos_extras"); //Fields wrapper | |
var add_button = $(".agregar_datos"); //Add button ID | |
<?php $datos = get_post_meta(get_the_id(), "datos_extras", true); | |
if($datos==null) $datos = 0; ?> | |
var x = <?php echo $datos ; ?>; | |
$(add_button).click(function(e){ //on add input button click |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Function add orden data | |
function insert_orden($idpost, $idauto, $idcliente, $idarrendatario, $contacto_nombre, $contacto_telefono, $contacto_email, $facturar, $ruc, $direccion, $fecha_ingreso, $hora_ingreso, $fecha_diagnostico) { | |
global $wpdb; | |
$table = "wp_ordenes"; | |
$wpdb->insert($table, array('idpost'=>$idpost, | |
'idauto'=>$idauto, | |
'idcliente'=>$idcliente, | |
'idarrendatario'=>$idarrendatario, | |
'contacto_nombre'=>$contacto_nombre, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$args = array( | |
'post_type'=> 'noticias', | |
'showposts'=> '4', | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'categoria', | |
'field' => 'slug', | |
'terms' => 'educacion', | |
), | |
), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
register_post_type( 'noticias', array( | |
'label' => __( 'noticias', 'anqatv' ), | |
'description' => __( 'Entradas para las noticias de AnqaTV', 'anqatv' ), | |
'labels' => array( | |
'name' => _x( 'Anqa Noticias', 'Post Type General Name', 'anqatv' ), | |
'singular_name' => _x( 'Noticia', 'Post Type Singular Name', 'anqatv' ), | |
'menu_name' => __( 'Noticias', 'anqatv' ), | |
'parent_item_colon' => __( 'De la Noticia:', 'anqatv' ), | |
'all_items' => __( 'Todas las Noticias', 'anqatv' ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php query_posts( array('post_type' => 'noticias', 'cat' => 104, 'showposts' => 4) ); | |
if (have_posts()) : | |
while (have_posts()) : the_post(); ?> | |
<p><?php the_title(); ?></p> | |
<?php endwhile; | |
endif; ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Con esta función podremos traer los archivos adjuntos de una página. Solo ponemos este código en la página deseada y nos mostrará los archivos. */ | |
$args = array( | |
'post_type' => 'attachment', | |
'numberposts' => null, | |
'post_status' => null, | |
'post_parent' => $post->ID | |
); |
NewerOlder