654 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Provided great contribution to our forums
  • Has been a beta tester for an Envato feature
+4 more
Gareth_Gillman says

I am building a wordpress theme using a Jquery slider, but slightly stuck with some custom php.

Each slider image has a custom id e.g. featured-slider-one, featured-slider-two etc

How can I do this in wordpress? Can I use the php count function or would that not work?

Thanks in advance

1383 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 10+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
wpCanyonThemes says

Add $count = 0; before the loop.

Add $count++ at top inside the loop.

And then echo it in the id part.

Did it numerous times :)

654 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Provided great contribution to our forums
  • Has been a beta tester for an Envato feature
+4 more
Gareth_Gillman says

Exactly what I thought, cheers

by
by
by
by
by
by