Skip to content

Instantly share code, notes, and snippets.

@HoussenMoshine
Last active November 18, 2017 04:14
Show Gist options
  • Save HoussenMoshine/f6e87856187ea293cd394ed760b71bcb to your computer and use it in GitHub Desktop.
Save HoussenMoshine/f6e87856187ea293cd394ed760b71bcb to your computer and use it in GitHub Desktop.
<script type="application/ld+json">
{
"@context":"http://schema.org",
"@type":"DiscussionForumPosting",
"@id":"<?php bbp_reply_id(); ?>",
"datePublished":"<?php the_time('c'); ?>",
"image":"https://s3-eu-west-1.amazonaws.com/s3.housseniawriting.com/wp-content/uploads/2017/11/17091829/forum-houssenia-writing-1.jpg",
"headline":"<?php bbp_topic_title(); ?>",
"articleSection":"<?php bbp_forum_title(); ?>",
"articleBody":"<?php echo wp_strip_all_tags( get_the_content() ); ?>",
"author": {
"@type": "Person",
"name": "<?php the_author(); ?>"
},
"interactionStatistic": {
"@type": "InteractionCounter",
"interactionType": "http://schema.org/ReplyAction",
"userInteractionCount": "<?php bbp_topic_reply_count() ?>"
}
}
</script>
@HoussenMoshine
Copy link
Author

Un exemple de code pour utiliser la balise DiscussionForumPosting de Schema.org pour ajouter des données structurées à un forum.

https://housseniawriting.com/schema-org/guide-schema-org/#Utiliser_Schemaorg_sur_un_forum_avec_la_balise_DiscussionForumPosting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment