Skip to content

Instantly share code, notes, and snippets.

Avatar

HoussenMoshine

View GitHub Profile
View paywall-schema-org
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "NewsArticle",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://example.org/article"
},
"headline": "Article headline",
"image": "https://example.org/thumbnail1.jpg",
@HoussenMoshine
HoussenMoshine / recipe-schema-org
Created Aug 19, 2017
Exemple de la balise Recipe de Schema.org
View recipe-schema-org
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Recipe",
"author": "Mariannick Laurent",
"cookTime": "PT40M",
"cookingMethod": "Friture",
"recipeCategory": "Entrée",
"recipeCuisine": "Afrique du Nord",
"datePublished": "2017-08-19",
@HoussenMoshine
HoussenMoshine / instant-view-telegram-template
Created Aug 12, 2017
Un exemple d'un Template Instant View pour Telegram
View instant-view-telegram-template
# Template de base pour Houssenia Writing
# Pour commencer, on va mettre le contenu principal de la page dans une variable
$main: //div[has-class("content")]
# La création du titre et de la description. Les balises has-class et @id vous permettent de faire correspondre le contenu de votre page avec le format Instant view
title: //h1[has-class("post-title")]
@HoussenMoshine
HoussenMoshine / jobPosting-schema-org
Last active Jul 16, 2017
Exemple de la balise jobPosting de Schema.org
View jobPosting-schema-org
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "JobPosting",
"jobBenefits": "Web Developpement et SEO",
"datePosted": "2017-07-16",
"description": "Description: Houssenia Writing cherche un rédacteur ou rédactrice web à temps plein pour ses contenus",
"validThrough" : "2019-03-24T00:00",
"educationRequirements": "Formation professionnelle en rédaction web",
"employmentType": "Prestataire",
@HoussenMoshine
HoussenMoshine / amp-bbpress
Created Jun 22, 2017
Code pour supporter l'AMP (Accelerated Mobile Pages) dans bbPress (plugin Code Snippets)
View amp-bbpress
/**
* Ajoute le format de l'AMP (Accelerated Mobile Pages) pour bbPress
*/
add_action( 'amp_init', 'amp_bbpress_init' );
function amp_bbpress_init() {
add_post_type_support( 'topic', AMP_QUERY_VAR );
}
@HoussenMoshine
HoussenMoshine / claimreview-schema-org
Created May 8, 2017
Exemple de la balise ClaimReview de Schema.org
View claimreview-schema-org
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "ClaimReview",
"url": "http://actualite.housseniawriting.com/hoax/2017/03/02/complotisme-le-cnrs-coupe-le-financement-dun-vaccin-prometteur-contre-le-vih/20854/",
"author":
{
"@type": "Organization",
"url": "https://actualite.housseniawriting.com",
"sameAs": "https://www.facebook.com/actualite.housseniawriting/"
@HoussenMoshine
HoussenMoshine / custom-field-schema-org
Created May 6, 2017
Code de Schema.org pour les champs personnalisés de Wordpress (le champ s'appelle schema)
View custom-field-schema-org
<!-- Code Custom pour Schema.org -->
<?php
$schema = get_post_meta(get_the_ID(), 'schema', true);
if(!empty($schema)) {
echo $schema;
}
?>
@HoussenMoshine
HoussenMoshine / AggregateRating-schema-org
Created May 6, 2017
Exemple de balise AggregateRating de Schema.org
View AggregateRating-schema-org
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Product",
"aggregateRating": {
"@type": "AggregateRating",
"bestRating": "100",
"ratingCount": "24",
"ratingValue": "87"
},
@HoussenMoshine
HoussenMoshine / rating-schema-org
Created May 6, 2017
Exemple de balise Rating de Schema.org
View rating-schema-org
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Review",
"itemReviewed": {
"@type": "Thing",
"name": "Honor 6X"
},
"headline" : "L'Honor 6X débarque en Europe et aux USA pour 250 euros",
"author": {
@HoussenMoshine
HoussenMoshine / sitenavigation-schema-org
Created May 6, 2017
Exemple de la balise SiteNavigation de Schema.org
View sitenavigation-schema-org
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "SiteNavigationElement",
"name": [
"Comment activer son compte Paypal à Madagascar ?",
"Utilisez Payoneer pour activer son compte Paypal",
"Demander une carte Payoneer",
"Activer la carte Payoneer",
"Activer votre compte Paypal à Madagascar",
You can’t perform that action at this time.