Support » Plugins » Hacks » Make Single.PHP output in hReview microformat?

  • So I need for every post on my site to be in hReview microformat. Is there anyway I can rewrite the code in single.php to do that?

Viewing 2 replies - 1 through 2 (of 2 total)
  • i had no idea what this was, a quick search showed me an example
    of the format:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    you’ll want to create custom post meta for all the extra info you
    will use (rating, summary etc)

    then edit single.php to output code similar to what’s above.
    basically build a table and add those class tags, and then
    have it input the custom meta into the span tags

    it’s really not bad, so just take it step by step
    and you’ll get it done. google is your friend.

    just to further the idea, depending on your theme
    single.php should contain the variable $content.

    you’ll want to modify the $content variable to something
    like this (using the first 2 lines of the above code)

    $content = '
    <div class="hreview">
    <span><span class="rating">';
    $content .= $custom_meta_rating;
    $content .= '</span> out of 5 stars</span>';
    return $content;

    a note, depending on how you create the custom meta, you will call it different ways, my $custom_meta variable is just an example.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Make Single.PHP output in hReview microformat?’ is closed to new replies.