Skip to content

Instantly share code, notes, and snippets.

View algmelo's full-sized avatar

André Melo algmelo

View GitHub Profile
@algmelo
algmelo / gist:525ec35a0be84fb2e2d926d2ae76c39c
Created February 14, 2018 20:31
Wordpress - Criando arquivos de tradução para temas e plugins
Internacionalizando seu tema
Para tornar seu tema traduzível é necessário adicionar os seguintes comentários no arquivo style.css:
/**
* Theme Name: Apenas um exemplo
* Author: Autor do tema
* Text Domain: apenas-um-exemplo
* Domain Path: /languages
*/
@algmelo
algmelo / popular-posts.php
Created July 20, 2017 19:08 — forked from wturrell/popular-posts.php
Wordpress & Google Analytics - retrieve most popular posts
@algmelo
algmelo / repeatable-fields-metabox.php
Created July 5, 2017 17:28 — forked from helen/repeatable-fields-metabox.php
Repeating Custom Fields in a Metabox
<?
/**
* Repeatable Custom Fields in a Metabox
* Author: Helen Hou-Sandi
*
* From a bespoke system, so currently not modular - will fix soon
* Note that this particular metadata is saved as one multidimensional array (serialized)
*/
function hhs_get_sample_options() {
@algmelo
algmelo / add-term-to-post-tag.php
Created July 5, 2017 16:15 — forked from ms-studio/add-term-to-post-tag.php
add term metabox to post_tag taxonomy - using WP 4.4 term meta functions
<?php
// source: http://wordpress.stackexchange.com/questions/211703/need-a-simple-but-complete-example-of-adding-metabox-to-taxonomy
// code authored by jgraup - http://wordpress.stackexchange.com/users/84219/jgraup
// REGISTER TERM META
add_action( 'init', '___register_term_meta_text' );
function ___register_term_meta_text() {