Skip to content

Instantly share code, notes, and snippets.

@FrankyCunza
FrankyCunza / simple-pagination.js
Created July 2, 2021 14:47 — forked from kottenator/simple-pagination.js
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;
@FrankyCunza
FrankyCunza / info.php
Last active August 4, 2019 21:18
Creacion de Tema Wordpress
<?php
functions.php
//scripts css y js
if(!function_exists('muebles_scripts')):
function muebles_scripts(){
wp_register_style('google-fonts','https://use.typekit.net/wzb2cmb.css',array(), '1.0.0','all');
wp_register_style('style',get_stylesheet_uri(),array('google-fonts'), '1.0.0','all');
wp_enqueue_style('google-fonts');
@FrankyCunza
FrankyCunza / acf.php
Created July 29, 2019 18:51
Advanced Custom Fields
//codigo repeater simple
<?php if ( have_rows('texto_blog_resaltado') ) : ?>
<?php while (have_rows('texto_blog_resaltado') ) : the_row();
// vars
$texto_blog_resaltado = get_sub_field('escribir_texto_blog_resaltado');
?>
<p><?php echo $texto_blog_resaltado; ?></p>
<?php endwhile; ?>
<?php endif; ?>
@FrankyCunza
FrankyCunza / etiquetas.html
Last active July 29, 2019 16:02
Etiquetas
Etique Audio:
<audio src="/" controls autoplay loop></audio>
Etiquea Video:
//poster es la imagen que se verá en el vídeo
<video src="video.webm" poster="presentacion.jpg" controls></video>
crear archivo name-post-types.php dentro de la carpeta Plugins
post type basico
<?php
/*
Plugin Name: Gourmet Artistry Post Types & Taxonomies
Plugin URI:
Description: Adds Custom Post Types to site.
Version: 1.0
Author: Frank Cunza
license: HDJW