Skip to content

Instantly share code, notes, and snippets.

View jpcontrerasv's full-sized avatar
馃彔
Working from home

Juan Pablo Contreras Vald茅s jpcontrerasv

馃彔
Working from home
View GitHub Profile
<?php query_posts('cat=7&showposts=1');
if ( have_posts() ) : while ( have_posts() ) : the_post();
endwhile; else:
@jpcontrerasv
jpcontrerasv / Else if.php
Last active August 29, 2015 14:04
Else if
<? if ( is_category( '9' ) ) { ?>
<? } else { ?>
<? } ?>
@jpcontrerasv
jpcontrerasv / Redireccion root a subdirectorio.txt
Created July 30, 2014 14:53
Redireccion root a subdirectorio
RewriteEngine On
RewriteRule ^$ /store [L]
@jpcontrerasv
jpcontrerasv / ambiar URL al click.html
Created July 30, 2014 14:53
Cambiar URL al click
onclick="window.location.hash = hash;"
A workaround fix is to wrap the wpdp class in wp-includes/wp-db.php in the following:
Line 52:
if(class_exists('wpdb') != true)
{
class wpdb {
...
}
@jpcontrerasv
jpcontrerasv / Evitar duplicados en contact form 7.php
Created July 30, 2014 14:53
Evitar duplicados en contact form 7
1 -
Change $formName to the name of your form
Change $fieldName to the name of your email field
Optionally change the error message
2- (agregar al functions.php)
@jpcontrerasv
jpcontrerasv / Toggle Class menu.js
Created July 30, 2014 14:53
Toggle Class menu
$('nav a').click(function () {
$('nav a').not(this).removeClass('active');
$(this).addClass('active');
});
@jpcontrerasv
jpcontrerasv / Condicional para m贸viles en general.css
Created July 30, 2014 14:53
Condicional para m贸viles en general
movil de mano
@media only screen and (max-width: 480px) {
}
@jpcontrerasv
jpcontrerasv / Headers Already Sent.php
Created July 30, 2014 14:53
Headers Already Sent
Eliminar los espacios en functions.php o wp-config.php
tambi茅n agregar <?php ob_start();?>
background: url(images/bg.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;