WordPress.org

Ready to get started?Download WordPress

Forums

Customizr
[resolved] Targeting Individual Slides (9 posts)

  1. njclonch
    Member
    Posted 6 months ago #

    I'm looking for a way to target the individual slides, so I can style the captions differently, but it doesn't look like each slide has its own id. Would this require a new section in the functions.php that would give each slide its own unique identifier?

  2. rdellconsulting
    Member
    Posted 6 months ago #

    Link to site?

  3. njclonch
    Member
    Posted 6 months ago #

  4. rdellconsulting
    Member
    Posted 6 months ago #

    Never tried this, but the alt="slider1" seems to be targettable.

    StackOverflow answer

    Be interested if you get it to work...

  5. njclonch
    Member
    Posted 6 months ago #

    I've tried the alt="slider1", but that seems to only target the image, and I can't get to the caption under it.

  6. njclonch
    Member
    Posted 6 months ago #

    I got it. I added a short line to class-content-slider.php. I dropped in "carousel-slide-<?php echo $id ?>" to the class on line 187.

  7. rdellconsulting
    Member
    Posted 6 months ago #

    Super job. Hope you did that in a Child Theme else you'll lose it on next update?

  8. njclonch
    Member
    Posted 6 months ago #

    Yes, I always use child themes.

  9. nikeo
    Member
    Theme Author

    Posted 6 months ago #

    Thanks for this feedback @njclonch. I will make it easier to target individual slides in the next release with a unique class/or id for each of them.
    Best

Reply

You must log in to post.

About this Theme

About this Topic