Skip to content

Commit e5b1332

Browse files
authored
Merge pull request #4 from denverprophitjr/Issue_#1_Schema_Answer_integration
fixes Issue #1 Schema Answer integration.
2 parents 2c78a3e + 837767d commit e5b1332

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

templates/content-single-answer.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
*/
88
?>
99
<div class="<?php echo dwqa_post_class() ?>"
10-
itemprop="suggestedAnswer<?php if ( dwqa_is_the_best_answer() ) : ?> acceptedAnswer<?php endif; ?>">
10+
itemprop="suggestedAnswer<?php if ( dwqa_is_the_best_answer() ) : ?> acceptedAnswer<?php endif; ?>" itemscope
11+
itemtype="http://schema.org/Answer">
1112
<aside class="dwqa-answer-vote" data-nonce="<?php echo wp_create_nonce( '_dwqa_answer_vote_nonce' ) ?>"
1213
data-post="<?php the_ID(); ?>">
1314

@@ -37,9 +38,10 @@
3738
<?php endif; ?>
3839
<span class="dwqa-answer-actions"><?php dwqa_answer_button_action(); ?></span>
3940
</div>
40-
<span class="dwqa-answer-content"><?php the_content(); ?>
41+
<span class="dwqa-answer-content" itemprop="text"><?php the_content(); ?>
4142
</span>
4243
</div>
4344
<?php do_action( 'dwqa_after_show_content_answer', get_the_ID() ); ?>
4445
<?php comments_template(); ?>
4546
</div>
47+
<!-- TODO Add parentItem schema attribute -->

0 commit comments

Comments
 (0)