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 | |
); |
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 | |
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
$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 | |
// 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
<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
<!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
.sidebar { | |
background: black; | |
color: white; | |
font-size: 30px; | |
height: 100%; | |
} | |
.sidebar img { | |
margin: 30px 0; | |
} | |
.sidebar i { |
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
<html> | |
<head> | |
<title>Practica de grillas</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-sm-4"> | |
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dolor ex, dictum et velit non, interdum sodales nulla. Suspendisse a ullamcorper est. Vestibulum in iaculis velit. Nam sit amet vestibulum risus. Vestibulum hendrerit egestas ipsum sed imperdiet. Nulla ante sem, sagittis vitae ex sed, commodo aliquet urna. Mauris eu massa libero. Mauris massa metus, elementum quis dignissim eget, egestas a libero. Maecenas viverra ligula sem, quis congue turpis feugiat et. Sed nec magna nisi. Vivamus convallis, est non varius aliquet, est lacus finibus lorem, nec pharetra tortor nulla maximus urna. Phasellus vulputate libero ut urna congue pharetra. Suspendisse dapibus nulla eu tellus eleifend, eget ullamcorper tellus pellentesque.</p> |
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
<script> | |
// Leer http://www.xatakaciencia.com/computacion/alphago-su-victoria-en-el-go-nos-encamina-a-un-nuevo-mundo-de-inteligencia-artifical | |
function randomIntervalo(numeroInicio, numeroFin) { | |
var aleatorio = Math.random(); | |
var diferencia = numeroFin - numeroInicio; | |
var numero = aleatorio * diferencia; | |
return Math.round(numero) + numeroInicio; |
OlderNewer