Skip to content

Instantly share code, notes, and snippets.

View haroldparis's full-sized avatar

Harold Paris haroldparis

View GitHub Profile
@haroldparis
haroldparis / functions.php
Last active December 19, 2018 11:09
Force Yoast SEO to only use Featured Image for og:image on singular
<?php
// Tell WordPress SEO to use only full featured image for og:image output... and nothing else on singular
function only_full_og_featured_image() {
global $post;
if ( is_singular() ) {
if ( function_exists( 'has_post_thumbnail' ) && has_post_thumbnail( $post->ID ) ) {
$featured_image_url = wp_get_attachment_image_src(get_post_thumbnail_ID( $post->ID ), 'full' );
return $featured_image_url[0];
}
}
<!doctype html><html>
<head>
<link rel="canonical" href="https://positivr.fr/daniel-carlmatz-mots-dessins-forme-sens/" />
<meta charset="utf-8" />
<meta property="op:generator" content="facebook-instant-articles-sdk-php" />
<meta property="op:generator:version" content="1.6.2" />
<meta property="op:generator:application" content="facebook-instant-articles-wp" />
<meta property="op:generator:application:version" content="4.0.6" />
<meta property="op:generator:transformer" content="facebook-instant-articles-sdk-php" />
<meta property="op:generator:transformer:version" content="1.6.2" />
@haroldparis
haroldparis / dabblet.css
Created January 5, 2014 09:52
Price Table - EFORM Learning
/**
* Price Table - EFORM Learning
*/
html,html a {
-webkit-font-smoothing: antialiased;
text-shadow: 1px 1px 1px rgba(0,0,0,0.004);
}
body {
@haroldparis
haroldparis / dabblet.css
Created December 13, 2013 08:56
Leadwork : Focus No price
/**
* Leadwork : Focus No price
*/
* {margin: 0; padding: 0;}
body {background: #ededed;}
.fo-container {
width: 780px;
margin: 20px auto;
@haroldparis
haroldparis / dabblet.css
Created December 13, 2013 08:56
Leadwork : Focus
/**
* Leadwork : Focus
*/
* {margin: 0; padding: 0;}
body {background: #ededed;}
.fo-container {
width: 780px;
margin: 20px auto;
@haroldparis
haroldparis / dabblet.css
Created December 2, 2013 10:09
Leadwork : Table de prix
/**
* Leadwork : Table de prix
*/
* {margin: 0; padding: 0;}
body {background: #ededed;}
#pt-container {
width: 780px;
margin: 100px auto;
@haroldparis
haroldparis / gist:6028003
Created July 18, 2013 09:29
Lien Google+
<a href="https://plus.google.com/ID/?rel=author">Mon profil Google+</a>
@haroldparis
haroldparis / class-wc-mailchimp-integration.php
Created July 5, 2013 21:28
WooCommerce : Newsletter Subscription Plugin on "single optin" mode for Mailchimp - Find the "$retval = $api->listSubscribe( $listid, $email, $vars );" line and modify accordingly adding the $double_optin=false and $send_welcome=false to listSubscribe(). Enjoy !
<?php
// Adding the $double_optin=false and $send_welcome=false parameters for single optin and no welcome email message
$retval = $api->listSubscribe( $listid, $email, $vars, $double_optin=false, $send_welcome=false );
?>
@haroldparis
haroldparis / adding_dd_to_woo.php
Created July 1, 2013 21:06
WooCommerce : Adding Digg Digg (works best with Normal Display) to woocommerce_share() on Single Product Pages
<?php
// Adding Digg Digg (works best with Normal Display) to woocommerce_share()
function adding_dd_to_woo() {
// first, let's remove Digg Digg from its normal hook
remove_filter('the_excerpt', 'dd_hook_wp_content');
remove_filter('the_content', 'dd_hook_wp_content');
// and execute it where we want
echo dd_hook_wp_content();
}
@haroldparis
haroldparis / force_wp_title_for_yoast.php
Last active December 19, 2018 11:10
WooCommerce : Forcing to use wp_title() over woo_title() for WordPress SEO by Yoast
<?php
// Forcing to use wp_title() for WordPress SEO by Yoast ... damn.
function force_wp_title_for_yoast() {
return wp_title();
}
add_filter( 'woo_title', 'force_wp_title_for_yoast' );
?>