How to add title above ratings in sidebar

This topic contains 3 replies, has 2 voices, and was last updated by  Simone 10 years, 6 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #18013

    frantletle
    Full Member
    Post count: 91

    I read:

    https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/

    and

    https://wpgeodirectory.com/support/topic/how-to-modify-detail-page/

    but think that only applies to adding/deleting the sidebar elements. What we want to do is add a title above the rating so users understand that it represents “average ratings”

    How is this done?

    At a high level, I think this is what I should do:

    1. add a new function to my child theme which:
    2. removes the function geodir_detail_page_review_rating() using a hook
    3. Re-add a new function, which simply copies the old one, but adds the changes. In this case, just some new HTML

    #18033

    Simone
    Expired Member
    Post count: 3515

    Hello, you were almost right (except that in this case you don’t need to remove the function).
    Add this in your functions.php (child theme) and you’re done

    
    
     add_action( 'geodir_before_detail_page_review_rating', 'geodir_before_detail_page_review_rating_new',10 );
    function geodir_before_detail_page_review_rating_new() {
    echo "Average Ratings"; }

    Obviously feel free to edit the text inside the echo 🙂

    #18429

    frantletle
    Full Member
    Post count: 91

    That worked!

    I really like this ability to customize without fear of overwriting on updates

    #18430

    Simone
    Expired Member
    Post count: 3515
    This reply has been marked as private.
Viewing 4 posts - 1 through 4 (of 4 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount