Skip to content

Instantly share code, notes, and snippets.

View jeherve's full-sized avatar
🚀
👨‍🏭

Jeremy Herve jeherve

🚀
👨‍🏭
View GitHub Profile
@jeherve
jeherve / plugin.php
Created March 4, 2014 19:49
[Jetpack] Check of Tonesque's file is readable https://cloudup.com/cKET0dvWlaX
<?php
/*
* Plugin Name: Check Jetpack's Tonesque
* Plugin URI: http://wordpress.org/extend/plugins/jetpack/
* Description: Check if the Tonesque file is readable
* Author: Jeremy Herve
* Version: 1.0
* Author URI: http://jeremyherve.com
* License: GPL2+
*/
@jeherve
jeherve / plugin.php
Last active August 29, 2015 13:57
Custom home query - remove sticky posts
<?php
// Customize the loop on your home page only
function jeherve_custom_home_query( $query ) {
if ( ! $query->is_main_query() )
return;
if ( ! $query->is_home() || ! $query->is_front_page() || is_admin() )
return;
$query->set( 'ignore_sticky_posts', true );
@jeherve
jeherve / style.css
Created March 28, 2014 20:48
Facebook - No Ads - 03/2014
/* No Ads */
.rightColumnWrapper #pagelet_ego_pane {
display: none;
}
@jeherve
jeherve / style.css
Created March 28, 2014 20:49
Youtube - hide " this account is managed by"
div#confirmBox { display: none; }
@jeherve
jeherve / style.css
Created March 28, 2014 20:50
Notes off
#wpadminbar #wp-admin-bar-notes, .dash-header #wp-admin-bar-notes, #newnavwrapper #wp-admin-bar-notes {
display:none;
}
@jeherve
jeherve / plugin.php
Last active August 29, 2015 14:02
[Jetpack] Change og:title value to be all uppercase
<?php
/*
* Plugin Name: Uppercase og:title for Jetpack
* Plugin URI: http://wordpress.org/extend/plugins/jetpack/
* Description: Removes Jetpack's default og:title tag, and replaces it with an uppercase og:title
* Author: Jeremy Herve
* Version: 1.0
* Author URI: http://jeremyherve.com
* License: GPL2+
*/
@jeherve
jeherve / plugin.php
Created July 23, 2014 10:32
[Jetpack] Verify your site with Facebook by adding an admin meta tag to the head of your site. Works when Jetpack is enabled. http://i.wpne.ws/WiUs
<?php
/*
* Plugin Name: Verify your site with Facebook
* Plugin URI: http://wordpress.org/plugins
* Description: Verify your site with Facebook by adding an admin meta tag to the head of your site. Works when Jetpack is enabled.
* Author: Jeremy Herve
* Version: 1.0
* Author URI: http://jeremy.hu
* License: GPL2+
*/
@jeherve
jeherve / style.css
Created August 11, 2014 23:19
[Jetpack] Wide Infinite Scroll container
#infinite-footer .container {
width: 100%;
}
@jeherve
jeherve / plugin.php
Created June 10, 2015 19:34
Disable Jetpack's Twitter Meta Tags
<?php
/*
* Plugin Name: Disable Jetpack's Twitter Meta Tags
* Plugin URI: http://wordpress.org/plugins/
* Description: Disable Jetpack's Twitter Meta Tags
* Author: Jeremy Herve
* Version: 1.0
* Author URI: http://jeremy.hu
* License: GPL2+
*/
@jeherve
jeherve / plugin.php
Created February 28, 2014 18:19
[Jetpack] Related Posts: retrieve Related Posts manually, and return post titles
<?php
function jeherve_custom_related( $atts ) {
$posts_titles = array();
if ( class_exists( 'Jetpack_RelatedPosts' ) && method_exists( 'Jetpack_RelatedPosts', 'init_raw' ) ) {
$related = Jetpack_RelatedPosts::init_raw()
->set_query_name( 'jeherve-shortcode' ) // Optional, name can be anything
->get_for_post_id(
get_the_ID(),
array( 'size' => 3 )