Skip to content

Instantly share code, notes, and snippets.

View victoras's full-sized avatar
💭
Building wplook.com

Victor T. victoras

💭
Building wplook.com
  • WPlook
  • Montreal
View GitHub Profile
/*-----------------------------------------------------------
Breadcrumbs
-----------------------------------------------------------*/
if ( ! function_exists( 'wplook_breadcrumbs' ) ) {
function wplook_breadcrumbs() {
$showOnHome = '0'; // 1 - show breadcrumbs on the homepage, 0 - don't show
$delimiter = '>'; // delimiter between crumbs
$showCurrent = '1'; // 1 - show current post/page title in breadcrumbs, 0 - don't show
$before = '<span class="current">'; // tag before the current crumb
@victoras
victoras / infinitescroll.js
Created January 27, 2014 14:18
infiniescroll
jQuery(document).ready(function () {
var container = document.querySelector('#js-masonry');
var msnry = new Masonry( container, {
// options
itemSelector: '.item'
});
});
jQuery('#js-masonry').infinitescroll({
@victoras
victoras / C metabox
Created January 21, 2014 20:41
Custom meta box for pages
<?php
/*-----------------------------------------------------------------------------------*/
/* Initialize the meta boxes.
/*-----------------------------------------------------------------------------------*/
add_action( 'admin_init', 'wpl_meta_boxes' );
function wpl_meta_boxes() {
@victoras
victoras / style.css
Created October 20, 2012 16:38 — forked from valeriu/style.css
WP-CSS: Wordpress classes
/* =============================================================================
WordPress WYSIWYG Editor Styles
========================================================================== */
.entry-content img {
margin: 0 0 1.5em 0;
max-width: 100%;
height: auto;
}
.alignleft, img.alignleft {
@victoras
victoras / gist:3923913
Created October 20, 2012 16:37 — forked from valeriu/gist:2033212
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(