Display Ranking number

Hello Guys,

I’m looking for a way to display the number of ranking before the title of listing.

Based on the reviews count the listings are ordered according to the rating.

So i want to make some kinda ranking like infront of the best rated listing it should say “#1 Expample Title” and the second best rated “#2 Expample Title” and so on…

You can think of a way to archieve this with a snippet?

Thanks in advance!

Sorry, there’s no simple code snippet - this requires advanced customizations.

If customizations are required for your site, please try customizing it using the collection of code snippets Search · user:hivepress · GitHub and other developer resources, or consider hiring someone for custom work https://fwd.cx/hLhc73mQCD9R

Ok thanks just found out it’s quite easy to number listings with only css at least for the listings archieve page

.hp-listings{
	list-style: none;
	counter-reset: my-awesome-counter;
}

.hp-listings .hp-listing__title a{
	counter-increment: my-awesome-counter;
	
}

.hp-listings .hp-listing__title a::before{
	content: counter(my-awesome-counter) " . ";
	color: red;
	font-weight: bold;
}

body{
	font-family: Montserrat, sans-serif; }

Now the only question is how to make it work on the single listing page… if someone has a way I’m looking forward to an answer!

2 Likes

You can try using this CSS selector to target the single listing page:

.hp-listing--view-page ...

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.