• I am trying to output a number next to each result that returns of what index it is in the list and also set that number in a custom marker in the map? Is this something that can be done? I will try and upload an image of the store locator am building.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Rob_Huska

    (@rob_huska)

    Here is the image, thank!

    Custom Map

    Thread Starter Rob_Huska

    (@rob_huska)

    So, I have been able to number the list itself by using a css counter. But I cannot seem to do the same thing for the markers since there are no specific classes on them. Any way to make that happen?

    • This reply was modified 7 years, 4 months ago by Rob_Huska.
    Thread Starter Rob_Huska

    (@rob_huska)

    So I was able to get the pins to count with some “hacky” CSS/SCSS…

    	#wpsl-gmap {
    		.gm-style > div:first-child > div:first-child > div:nth-child(4) {
    			counter-reset: pin-counter;
    			> div {
    				&:after {
    					counter-increment: pin-counter;
    					content: counter(pin-counter);
    					font-size: 1rem;
    					position: absolute;
    					left: 0;
    					top: 0;
    				}
    				&:nth-child(1),
    				&:nth-child(2) {
    					&:after {
    						content: none;
    					}
    				}
    			}
    		}
    	}
    

    Not sure if this will always work, so if you have a better solution that would be great! Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Number the results’ is closed to new replies.