454 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Microlancer Beta Tester
  • Referred between 1 and 9 users
  • United Kingdom
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
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
  • Serbia
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 :)

454 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Microlancer Beta Tester
  • Referred between 1 and 9 users
  • United Kingdom
Gareth_Gillman says

Exactly what I thought, cheers

by
by
by
by
by
by