Skip to content

Instantly share code, notes, and snippets.

View flabernardez's full-sized avatar

Flavia Bernárdez Rodríguez flabernardez

View GitHub Profile
@flabernardez
flabernardez / reset.css
Last active April 9, 2018 15:55
#css Reset
*,
*::before,
*::after,
*:before,
*:after{
box-sizing: border-box;
}
html, body, div, span, iframe,
h1,h2, h3, h4, h5, h6, p, blockquote,
a, address, em, img, small, strong,
@flabernardez
flabernardez / functions.php
Last active April 17, 2018 11:35
#wordpress Encolar Scripts & Styles
<?php
function fla_enqueue_scripts_styles() {
wp_enqueue_style( 'aries-theme-fonts', '//fonts.googleapis.com/css?family=Montserrat:100,100i,300,300i,500,500i,700,700i', array(), CHILD_THEME_VERSION );
wp_enqueue_style( 'dashicons' );
wp_enqueue_style( 'style-bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css' );
wp_enqueue_style( 'style-main', get_stylesheet_uri() );
wp_enqueue_script( 'jquery', 'https://code.jquery.com/jquery-3.1.1.min.js' );
@flabernardez
flabernardez / .sql
Last active April 17, 2018 11:36
#wordpress Cambiar el prefijo de las tablas
/* En wp-config.php*/
$table_prefix = 'tuprefijo_';
/* En administrador de la base de datos, ejecutar los siguientes comandos SQL */
RENAME TABLE wp_links TO tuprefijo_links;
RENAME TABLE wp_commentmeta TO tuprefijo_commentmeta;
RENAME TABLE wp_comments TO tuprefijo_comments;
RENAME TABLE wp_options TO tuprefijo_options;
RENAME TABLE wp_postmeta TO tuprefijo_postmeta;
RENAME TABLE wp_posts TO tuprefijo_posts;
@flabernardez
flabernardez / functions.php
Last active April 17, 2018 11:42 — forked from tanmay27vats/function.php
#woocommerce Eliminar tipos de productos en el selector de opciones
<?php
function fla_remove_product_types( $types ){
unset( $types['grouped'] );
unset( $types['external'] );
unset( $types['variable'] );
unset( $types['simple'] );
unset( $types['downloads'] );
return $types;
@flabernardez
flabernardez / functions.php
Last active April 17, 2018 11:34
#wordpress Quitar enlaces imágenes por defecto
<?php
function fla_imagelink_setup() {
    $image_set = get_option( 'image_default_link_type' );
   
    if ($image_set !== 'none') {
        update_option('image_default_link_type', 'none');
    }
}
add_action('admin_init', 'fla_imagelink_setup', 10);
@flabernardez
flabernardez / wp-query-ref.php
Last active April 17, 2018 11:36 — forked from luetkemj/wp-query-ref.php
#wordpress Referencia Query
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@flabernardez
flabernardez / gradient-shadow.md
Last active April 17, 2018 11:40 — forked from tunguskha/Gradient shadow in pure CSS.md
#css Tutorial sombra en gradiente

Gradient shadow in pure CSS

alt text

HTML
<button>Let's Go !</button>
@flabernardez
flabernardez / genesis-custom-loop-pagination.php
Last active April 17, 2018 11:39 — forked from billerickson/genesis-custom-loop-pagination.php
#genesis Cambiar loop con paginación
<?php
/* Template Name: Test */
/**
* Genesis custom loop
*/
function be_custom_loop() {
global $post;
// arguments, adjust as needed
@flabernardez
flabernardez / functions.php
Last active April 17, 2018 11:41 — forked from OscarAbadFolgueira/dinapyme-woocommerce-modificar-texto-oferta.php
#woocommerce Cambiar el texto de "oferta" en los productos rebajados
<?php
function dinapyme_wc_modificar_texto_oferta( $texto ) {
return str_replace( __( 'Sale!', 'woocommerce' ), __( '¡Promoción!', 'woocommerce' ), $texto );
}
add_filter( 'woocommerce_sale_flash', 'dinapyme_wc_modificar_texto_oferta' );
@flabernardez
flabernardez / functions.php
Last active April 17, 2018 11:35 — forked from PCianes/admin_notice.php
#wordpress Añadir avisos en el dashboard
<?php
/**
* Some example snippets for the control of notices in WordPress admin panel
*
* @package PCianes\AdminUtilities
* @since 1.0.0
* @author PCianes
* @license GNU General Public License 2.0+
*/
namespace PCianes\AdminUtilities;