Skip to content

Instantly share code, notes, and snippets.

View lonchbox's full-sized avatar
😎

Pancho lonchbox

😎
View GitHub Profile
@lonchbox
lonchbox / app.js
Created June 20, 2014 10:26
App.js to load Foundation Zurb javascript. Make WordPress custom menu compatible with Foundation Zurb top-bar classes
jQuery(document).ready(function($) {
/* WORDPRESS NAV-BAR SUPPORT ------------- */
/* Adds support for the top-bar with flyouts in WordPress */
$('.top-bar-section li').has('ul').addClass("has-dropdown");
$('.top-bar-section li.has-dropdown ul').addClass("dropdown");
/*loads foundation*/
jQuery(document).foundation();
@lonchbox
lonchbox / index.html
Created September 11, 2012 16:51
Text effect animations
<html>
<body>
<p>fly in, fly out</p>
</body>
</html>
@lonchbox
lonchbox / grunfile.js
Last active November 4, 2015 09:27
Example to use grunt-wp-i18n makepot, update .po from .pot and grunt-po2mo
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// LESS Compilation
less: {
development: {
options: {
paths: ["src/css"]
@lonchbox
lonchbox / LongSocial-Contact.txt
Last active November 23, 2015 11:51
LongSocial WordPress Theme Contact page template code
<!-- EXAMPLE 1 -->
<div class="row">
<div class="col-md-6">[contact-form-7 id="88" title="Contact form 1"]</div>
<div class="col-md-6">
<address>
<strong>33 Themes HQ</strong>
Carrer d'En Bosc, 8
@lonchbox
lonchbox / gist:fb152c46f4ed5c1a410f
Created March 10, 2016 16:25
Display Custom Taxonomy image field with Pods.io
<?php
$terms = get_terms( 'TAXONOMY' );
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
foreach ( $terms as $term ) {
echo '<div class="item">';
$icon = pods_field( 'TAXONOMY', $term->term_id, 'FIELD', true );
$icon_url = $icon['guid'];
$icon_thumb = pods_image_url ( $icon_url, 'thumbnail', 0, false ) ;
$term_link = get_term_link($term);
echo '<a href="'.$term_link.'">';
@lonchbox
lonchbox / gist:999616a3586f2817af71
Created March 10, 2016 20:51
WPML custom language switcher
<?php
/*
* WPML language switcher customizations: htp://wpml.org
*/
function custom_wpml_lang_switcher() {
if (function_exists('icl_get_languages')){
// remove WPML default css
define('ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS', true);
// Custom language layout selector ?>