Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
👨‍🏭

Jeremy Herve jeherve

🚀
👨‍🏭
View GitHub Profile
@jeherve
jeherve / plugin.php
Last active May 31, 2016
Random classes for each post.
View plugin.php
<?php
/**
* Plugin Name: Random classes for each post
* Plugin URI: http://jeremy.hu
* Description: Random classes for each post
* Version: 1.0
* Author: Jeremy Herve
* Author URI: http://jeremy.hu
* Text Domain: jeherve
* Domain Path: /languages/
@jeherve
jeherve / plugin.php
Last active May 14, 2016
[Jetpack] Remove all CSS.
View plugin.php
<?php
// First, make sure Jetpack doesn't concatenate all its CSS
add_filter( 'jetpack_implode_frontend_css', '__return_false' );
// Then, remove each CSS file, one at a time
// You probably won't need them all, unless you use all the modules, and all the themes! :)
// Some of these are also only loaded on specific admin pages, so it wouldn't affect your readers
function jeherve_remove_all_jp_css() {
wp_deregister_style( 'AtD_style' ); // After the Deadline
@jeherve
jeherve / plugin.php
Created May 11, 2016
Jetpack's Top Posts Widget: add post date and post author below each post.
View plugin.php
<?php
/**
* Plugin Name: Top Posts Widget: add post date and post author below each post.
* Plugin URI: http://jeremy.hu
* Description: Top Posts Widget: add post date and post author below each post.
* Version: 1.0
* Author: Jeremy Herve
* Author URI: http://jeremy.hu
* Text Domain: jeherve
* Domain Path: /languages/
View keybase.md

Keybase proof

I hereby claim:

  • I am jeherve on github.
  • I am jeherve (https://keybase.io/jeherve) on keybase.
  • I have a public key ASAl-uJBAlYWAIQlao8U6zG1_YGVBgnxG-RXQjgUYZ_l0Qo

To claim this, I am signing this object:

@jeherve
jeherve / plugin.php
Last active Apr 8, 2016
[Jetpack] Add a default fallback image if no image can be found in a post
View plugin.php
<?php
/*
* Plugin Name: Jetpack default image
* Plugin URI: http://wordpress.org/extend/plugins/
* Description: Add a default fallback image if no image can be found in a post
* Author: Jeremy Herve
* Version: 1.0
* Author URI: http://jeremyherve.com
* License: GPL2+
*/
@jeherve
jeherve / plugin.php
Last active Mar 25, 2016
[Jetpack] Exclude certain categories from Jetpack Subscriptions
View plugin.php
<?php
/*
* Plugin Name: Exclude the asmodeus category from Jetpack Subscriptions
* Plugin URI: http://wordpress.org/plugins/jetpack/
* Description: Exclude the asmodeus category from Jetpack Subscriptions
* Author: Jeremy Herve
* Version: 1.0
* Author URI: http://jeremyherve.com
* License: GPL2+
*/
@jeherve
jeherve / plugin.php
Last active Mar 1, 2016
[Themify Ultra / Jetpack's Photon module
View plugin.php
<?php
/**
* The theme appears to be using its own function, `themify_get_image()`, to build image URLs used to display images above posts.
* It can grab image details (like dimensions) from custom fields in each post,
* and then builds a custom HTML output based on parameters you can add to the function.
*
* Photon won't be able to support that, so they'll need to make these images don't get processed by Photon at all.
*
* Add the following to a functionality plugin to force Photon to ignore such images
*/
@jeherve
jeherve / grep
Created Jan 24, 2014
[Jetpack] Count the number of filters in Jetpack
View grep
grep -o -r apply_filters * | wc -l
@jeherve
jeherve / style.css
Created Dec 18, 2013
[Woocommerce / Jetpack ] Get multiple columns for your products in Jetpack's Mobile Theme https://plus.google.com/u/0/106938199869823595443/posts/RWQuhehyf1X
View style.css
.mobile-theme .hentry,
.mobile-theme .no-results {
clear: none;
}
@jeherve
jeherve / plugin.php
Created Dec 16, 2013
[Jetpack] Add the category name before the Publicize message More details: here: http://wordpress.org/support/topic/jetpack-publicize?replies=18#post-4836869
View plugin.php
<?php
// Create our custom Publicize message
function jeherve_cust_pub_message() {
$post = get_post();
// Grab the first category of your post
if ( !empty( $post ) )
$categories = get_the_category( $post->ID );
You can’t perform that action at this time.