Skip to content

Instantly share code, notes, and snippets.

@ocean90
ocean90 / post.html
Created September 6, 2012 08:39
Add/load social plugins after 5 seconds
<div class="share-box twitter">
<span>Auf Twitter teilen</span>
<a style="display:none" href="https://twitter.com/share" class="twitter-share-button" data-lang="de" data-dnt="true" data-count="vertical">Twittern</a>
</div>
<div class="share-box googleplus">
<span>Auf Google+ teilen</span>
<div class="g-plusone" data-size="tall"></div>
</div>
<?php
/**
* Teaser Thumbnail
* Overrides the thumbnail option set in Genesis > Theme Settings
* if on a teaser post
*
* @param string $opt
* @return string
*/
@remkus
remkus / gist:2941390
Created June 16, 2012 13:55
Add WordPress' thickbox
<?php
add_action( 'init','fsm_thickbox' );
/**
* fsm_thickbox function.
*
* @access public
* @param mixed $text
* @return void
@remkus
remkus / functions.php
Created June 5, 2012 18:41 — forked from gregrickaby/functions.php
Custom Post-Info with Google Rich Snippet support
remove_action( 'genesis_before_post_content', 'genesis_post_info' );
add_action( 'genesis_before_post_content', 'child_post_info' );
/**
* Custom Post-Info with Google Rich Snippet support
*
* @author Greg Rickaby
* @since 1.0.0
*/
function child_post_info() {
if ( is_page() )
@gregrickaby
gregrickaby / home.php
Created June 3, 2012 04:02 — forked from jtsternberg/home.php
Genesis Custom Loop w/ Featured Image and Odd/Even support
<?php
$odd_or_even = 'even';
$args = array(
'cat' => 1,
'posts_per_page' => 2,
'order' => 'DESC'
);
$query = new WP_Query( $args );
if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post();
@remkus
remkus / gist:2580322
Created May 2, 2012 20:42
Filter one Post Format via a Custom Loop.
<?php
$args = array(
'post_type' => 'post',
'post_status' => 'publish',
'order' => 'DESC',
'tax_query' => array(
array(
'taxonomy' => 'post_format',
'field' => 'slug',
@vc27
vc27 / oembed-post-meta
Created March 24, 2012 17:05
Adds a custom metabox to specified post_types allowing for youtube and vimeo oembed to be saved as hidden postmeta. Returns visalbe video url and video
<?php
/*
Plugin Name: Oembed as Post Meta
Author: Randy Hicks
Plugin URI: http://visualcoma.com
Author URI: http://visualcoma.com
Version: 0.2
Updated: 09.29.12
Description: Adds a custom metabox to specified post_types allowing for youtube and vimeo oembed
to be saved as hidden postmeta. Returns visalbe video url and video thumbnail.
@remkus
remkus / add-menu.php
Created March 22, 2012 18:59
Pre populate Custom Menus
<?php
add_action( 'init', 'add_menus' );
function add_menus() {
register_nav_menus( array( 'main_nav' =--> 'The main menu', ) );
$new_menu_id = wp_create_nav_menu( 'Main Menu' );
@remkus
remkus / gist:2157116
Created March 22, 2012 08:23
Adding Widget Area in between Grid
<?php
add_action( 'genesis_after_post','ecowijs_add_widget_area_between_grid' );
/**
* The ecowijs_add_widget_area_between_grid function is all about
* dAdding Widget Area between Genesis Featured and Genesis Gri
*
* @access public
* @return void
*/
@gregrickaby
gregrickaby / functions.php
Created March 21, 2012 19:19
Genesis Comments Form
add_filter( 'genesis_comment_form_args', 'child_comment_form' );
/**
* Change "Post Comment" button text.
*
* @author Greg Rickaby
* @since 1.0.0
*/
function child_comment_form($args) {
$args = array (
'label_submit' => __( 'Submit', 'genesis' ),