Skip to content

Instantly share code, notes, and snippets.

View mahangu's full-sized avatar

Mahangu Weerasinghe mahangu

  • Automattic, Inc.
  • Colombo, Sri lanka
  • 11:57 (UTC +05:30)
View GitHub Profile
@mahangu
mahangu / gist:7efe926542627d938926
Created February 11, 2016 08:33
Jetpack Related Posts - Custom CSS code to invert image hover opacity
#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post {
opacity: 1;
}
.jp-relatedposts-post-img:hover {
opacity: 0.4;
function jetpackme_portfolio_excerpts() {
add_post_type_support( 'jetpack-portfolio', 'excerpt' );
}
add_action( 'init', 'jetpackme_portfolio_excerpts' );
add_action('init', 'mcp_add_coupon_to_publicize');
function mcp_add_coupon_to_publicize() {
add_post_type_support( 'coupon', 'publicize' );
}
#image-3 .wp-caption-text { text-align: left; }
<?php echo do_shortcode('[jetpack_subscription_form title="My Custom Title" subscribe_text="My custom subscribe text!" subscribe_button="Sign Me Up" show_subscribers_total="1"]'); ?>
add_filter( 'the_title', 'wcmumbai_add_promo', 10, 2);
function wcmumbai_add_promo( $title, $id = null ) {
$title = "WordCamp Mumbai >> " . $title;
return $title;
}
add_filter( 'login_message', 'wcmumbai_login_message' );
function wcmumbai_login_message( $message ) {
return "<p>Are you going to WC Mumbai? You should be!";
}
add_action( 'admin_notices','wcmumbai_admin_notice' );
function wcmumbai_admin_notice() {
echo '<div class="notice notice-info">Hello, WordCamp Mumbai!</div>';
}
add_action( 'comment_form', 'wcmumbai_comment_form' );
function wcmumbai_comment_form( $post_id ) {
echo '<strong>Are you posting about WC Mumbai? You should be!</strong>';
}
#wpspd-sidebar-widget-area .widget_wpcom_social_media_icons_widget li a.genericon {
font-family: Genericons !important;
}