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
@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();?>
@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 / 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 / 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)
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 / ambiar URL al click.html
Created July 30, 2014 14:53
Cambiar URL al click
onclick="window.location.hash = hash;"
@jpcontrerasv
jpcontrerasv / Redireccion root a subdirectorio.txt
Created July 30, 2014 14:53
Redireccion root a subdirectorio
RewriteEngine On
RewriteRule ^$ /store [L]
@jpcontrerasv
jpcontrerasv / Else if.php
Last active August 29, 2015 14:04
Else if
<? if ( is_category( '9' ) ) { ?>
<? } else { ?>
<? } ?>
<?php query_posts('cat=7&showposts=1');
if ( have_posts() ) : while ( have_posts() ) : the_post();
endwhile; else:
<?php include 'header.php'; ?>