• Hello I’m looking for a plugin where I can set different values to rate games like: graphics, music, gameplay, etc. And maybe an overall score while on the editor, I use classic editor.

    it should have some short code to display it somewhere on single post.

    i ask because when I search for review plugins I see they are for users to rate the posts, and that’s not what I want.

    thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • One really simple way to do this would be via custom fields. If you’re using the classic editor, you should be able to set custom fields on your post.

    Once you’d added your fields (e.g. graphics_rating, music_rating, gameplay_rating etc.), you can display them via registering a shortcode in your child theme functions:

    add_shortcode( 'game_rating', function(){

    // Start output buffering.
    ob_start();

    // Customize layout here...
    echo '<div class="game_rating">';

    echo '<p><strong>Graphics: </strong>' . get_post_meta(get_the_ID(), 'graphics_rating', true) . '</p>';
    echo '<p><strong>Music: </strong>' . get_post_meta(get_the_ID(), 'music_rating', true) . '</p>';
    echo '<p><strong>Gameplay: </strong>' . get_post_meta(get_the_ID(), 'gameplay_rating', true) . '</p>';

    echo '</div>';

    // Return buffered output.
    return ob_get_clean();

    } );

    Once that’s in your functions.php file, you can use the shortcode [game_rating] to show your rating widget. Hope that helps!

    Thread Starter dylandawg

    (@dylandawg)

    I will do that then. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.