Title: JSON-lD Microdata
Last modified: August 31, 2016

---

# JSON-lD Microdata

 *  Resolved [Patrick_D1985](https://wordpress.org/support/users/patrick_d1985/)
 * (@patrick_d1985)
 * [10 years ago](https://wordpress.org/support/topic/json-ld-microdata/)
 * Hi there,
 * First of; been using your plugin for quite some time.
    Since I started looking
   into JSON-LD and microdata a while back and its benefits for SEO i wanted to 
   also expand this to Decent Comments and it’s comment display.
 * Getting that setup should not be that hard;
    adding this in the class-decent-
   comments-renderer.php in the for each loop for get_comments should work after
   the closing div tag.
 *  /**
    * Custom JSON-LD Addition for comments */ $jsonld_comment_date = get_comment_date(‘
   c’, $comment->comment_ID); $jsonld_comment_title = get_the_title($comment->comment_post_ID);
   $jsonld_comment_link = get_permalink($comment->comment_post_ID); $jsonld_comment_discuss_link
   = get_permalink($comment->comment_post_ID) . ‘#comment-‘ . $comment->comment_ID;
   $jsonld_full_comment = $comment->comment_content;
 *  $output .= ‘<script type=”application/ld+json”>
    { “@context”: “[http://schema.org&#8221](http://schema.org&#8221);,“
   @type”: “Comment”, “comment”: “‘ . $jsonld_full_comment . ‘”, “text”: “‘ . $jsonld_full_comment.‘”,“
   datePublished”: “‘ . $jsonld_comment_date . ‘”, “author”: “‘ . $comment->comment_author.‘”,“
   name”: “‘ . $jsonld_comment_title . ‘”, “about”: “‘ . $jsonld_comment_title .‘”,“
   discussionUrl”: “‘ . $jsonld_comment_discuss_link . ‘”, “url”: “‘ . $jsonld_comment_link.‘”}
   </script>’;
 * Sadly when I try to change anything in regard to class-decent-comments-renderer.
   php it does not seems to take. For reference I am using the widget though.
 * Any help would be greatly appreciated!
 * [https://wordpress.org/plugins/decent-comments/](https://wordpress.org/plugins/decent-comments/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [Patrick_D1985](https://wordpress.org/support/users/patrick_d1985/)
 * (@patrick_d1985)
 * [10 years ago](https://wordpress.org/support/topic/json-ld-microdata/#post-7367072)
 * Also adding simple classes to various of the HTML elements does not seem to do
   anything.
    I have cleared server cache, browser cache , teste with various other
   browsers etc.
 * Also when I make the file class-decent-comments-renderer.php empty but available
   it still gets its default templating so to speak.
 * Hope this helps to clarify the above a bit more.
 * Kind regards,
    Patrick Dankers
 *  Thread Starter [Patrick_D1985](https://wordpress.org/support/users/patrick_d1985/)
 * (@patrick_d1985)
 * [10 years ago](https://wordpress.org/support/topic/json-ld-microdata/#post-7367169)
 * Nevermind it seems to have really been one of those weird weird cache cases where
   you have tried a zillion things to get it cleared. To realise a day later your
   changes are now in effect.
 * Sorry about the mixup!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘JSON-lD Microdata’ is closed to new replies.

 * ![](https://ps.w.org/decent-comments/assets/icon-256x256.png?rev=1693486)
 * [Decent Comments](https://wordpress.org/plugins/decent-comments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/decent-comments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/decent-comments/)
 * [Active Topics](https://wordpress.org/support/plugin/decent-comments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/decent-comments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/decent-comments/reviews/)

## Tags

 * [json-ld](https://wordpress.org/support/topic-tag/json-ld/)
 * [microdata](https://wordpress.org/support/topic-tag/microdata/)

 * 2 replies
 * 1 participant
 * Last reply from: [Patrick_D1985](https://wordpress.org/support/users/patrick_d1985/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/json-ld-microdata/#post-7367169)
 * Status: resolved