Home Forums Theme Support Cassiopeia I can't add alt (tag) to featured slides or slides

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2502

    Hi,

    Hope all is well.
    How can I add alt tags to improve SEO to the featured slides and slides of the Cassiopeia Theme.

    Thank in advance.
    Best Regards,
    Fuad

    #2505

    Hi there,

    It will require some serious editing of the files to add custom alt boxes for each slide item. A workaround will be to display the slide title as the alt attribute.

    Let me know if you want to do this and I’ll guide you.

    Cheers!
    Chris

    #2507

    Hi Chris,

    Thanks for your fast response.
    Yes, I want to do this. I need alt tags on my featured sliders and other sliders i have in other pages. When I view the source of my page I see the alt of the slide images no text. Don’t know where to go and add text. I need text on the alt tag of the images .

    Hope to hear from you soon.
    Regards,
    Fuad

    #2511

    Hey,

    Here’s what to do:

    Go to the theme’s folder > includes and edit the file named “featured-slider.php”.

    Now, on line 14 you’ll see the alt attribute. Inside the quotes paste this:

    <?php echo $slide['title']; ?>

    So, instead of this:

    <img src="<?php echo $slide['url']; ?>" alt="" />

    The code in the end should look like this:

    <img src="<?php echo $slide['url']; ?>" alt="<?php echo $slide['title']; ?>" />

    Save. Done.

    Cheers!

    #2513

    Hi Chris,

    Thanks a lot. It’s working now.

    Have a great day.
    Cheers,
    Fuad

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.