Skip to content

Instantly share code, notes, and snippets.


Jeremy Herve jeherve

Block or report user

Report or block jeherve

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jeherve / asynchrone-social.php
Created Jul 7, 2011
Boutons Like et +1 en asynchrone
View asynchrone-social.php
//Pour Facebook, apres avoir appele FB.init, charger connect js en asynchrone
<script type="text/javascript">
window.fbAsyncInit = function() {
appId : xxx,
session : xxx,
status : true,
cookie : true,
jeherve / in-header.php
Created Jul 23, 2011
fb:image handled by WordPress custom fields
View in-header.php
<?php if ( get_post_meta($post->ID, 'fbimage', true) ) : ?>
<meta property="og:image" content="<?php echo(get_post_meta($post->ID, "fbimage", true)); ?>" />
<?php endif; ?>
jeherve / single.php
Created Aug 25, 2011
Add schema information to WordPress loop
View single.php
<div itemscope itemtype="" class="content">
<h1 itemprop="name"><?php the_title(); ?></h1>
<div class="entry-content">
if ( has_post_thumbnail() )
the_post_thumbnail( 'single-post-thumbnail', array( 'itemprop' => 'image' ) );
echo '<img src="' . get_bloginfo( 'stylesheet_directory' ) . '/images/default_thumb1.jpg" class="attachment wp-post-image" />';
jeherve / functions.php
Created Sep 30, 2011
Add new Google+ field to WordPress profiles
View functions.php
* Add Google field to WordPress profile
* Kudos to Justin Tadlock
// Display the new field
function werewp_googleplus_field( $user ) { ?>
<h3>Extra profile information</h3>
jeherve / _layoutsbooks.html
Created Oct 5, 2011
Try out at getting layout name in container class
View _layoutsbooks.html
layout: layout
<div class="{{ post.layout }}">
{{ content }}
jeherve / functions.php
Created Oct 12, 2011
Add Google +snippets to TwentyTen page template
View functions.php
function werewp_image_plus($html, $id , $class){
$html = str_replace('class="'.$class.'"','itemprop="image" class="'.$class.'"',$html);
return $html;
jeherve / functions.php
Created Oct 12, 2011
Add new og:image when using the custom field images plugin
View functions.php
function werewp_ogimage() {
$customimage = get_custom_field_image();
echo '<meta property="og:image" content="'.$customimage.'" />';
add_action( 'wp_head', 'werewp_ogimage' );
jeherve / index.html
Created Oct 25, 2011
Random static construction landing page
View index.html
<!doctype html>
<title>Not ready yet, come back later!</title>
<script src="/mint/?js"></script>
<style type="text/css">
html { background: #fff url( no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; height: 100% }
jeherve / header.php
Created Oct 26, 2011
[WordPress support] mod twentyeleven header Google+1
View header.php
* The Header for our theme.
* Displays all of the <head> section and everything up till <div id="main">
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
jeherve / migrate.rb
Created Dec 16, 2011
[Jekyll] WordPress migration
View migrate.rb
#!/usr/bin/env ruby
# Input: WordPress XML export file.
# Outputs: a series of Textile files ready to be included in a Jekyll site,
# and comments.yml which contains all approved comments with metadata which
# can be used for a Disqus import.
# Credits: @ecerulm
# Changes from the original gist:
# 1. Handles titles containing special characters. Those have to be YAML escaped
# 2. Use the original permalinks in wordpress.
You can’t perform that action at this time.