Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • If you don’t have a lot of names in your taxonomy, my solution for categories may help
    https://www.ads-software.com/support/topic/rating-categories-2/

    Thread Starter fred_villa

    (@fred_villa)

    OK, I’ve find a different way to do what I want.

    I’ve added categories and tags to Pages.

    function add_taxonomies_to_pages() {
     register_taxonomy_for_object_type( 'post_tag', 'page' );
     register_taxonomy_for_object_type( 'category', 'page' );
     }
    add_action( 'init', 'add_taxonomies_to_pages' );

    Then I created Pages for each Video Games declaring the Page to the associated category for the Video Game.
    I needed to learn how to use WP_Query for the loop, a little hard at first but really interesting for the final result.

    So now my Platform pages are linking all pages for the Video Games, and a Video Game page is linking to posts for the Video Game category.

    This way visitors will be able to rate Video Games and I could rank them by rate with the precious
    'meta_key' => 'ratings_average', 'orderby' => 'meta_value_num', 'order' => 'DESC'

    Now I need a different kind of help.
    Is there a function to call to display only %RATINGS_AVERAGE% on some places?
    Cause using the_ratings() displays the stars. As I use 10 stars, on some place of the site I would prefer to only display the %RATINGS_AVERAGE%.

    Thanks for your help.

    • This reply was modified 7 years, 8 months ago by fred_villa.
    Thread Starter fred_villa

    (@fred_villa)

    Thanks for your answer.
    It offers me to not continue to try to find a solution when there’s none.

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