• Resolved cag8f

    (@cag8f)


    Hi all. I am trying to change the alt text of a particular image on my homepage. Here is the page, and this is the image in-question. Something is causing the alt text to display as ‘Horizon Residences,’ and I want to edit it. I’ve ensured that the media file in the WP back-end has my desired alt-text (screenshot). Also, when I add the image to the page in the WordPress back-end, I’ve ensured that the alt-text is my desired text (screenshot).

    Any thoughts on how to track down the cause of this mysterious alt text?

    The theme authors are completely unresponsive, which is one reason I am here.

    To check if any templates have the current alt text hard coded, I used grep to search through my child theme files for the term ‘Residence.’ But that search did not return anything. I also tried searching for the string ‘alt,’ but couldn’t see anything relevant.

    Thanks in advance.

    • This topic was modified 7 years, 8 months ago by cag8f.
    • This topic was modified 7 years, 8 months ago by cag8f.
Viewing 13 replies - 1 through 13 (of 13 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    It will depend on how the theme is built. As you’re using a commercial theme it’s best to talk to the theme author for support: https://themeforest.net/user/CRIK0VA

    Thread Starter cag8f

    (@cag8f)

    Thanks for the reply. I should have mentioned that the theme author is completely unresponsive. I even have paid support ??

    I’ll edit my post to reflect that.

    Hello,

    Might there be a cache plugin ? If yes don’t forget to purge the cache it might not be done automatically so you still see the previous page cached.

    How do you add the image on the page? Through a Page Builder ( like Visual Composer for example ) Or is it just a plain post? You can always check the ‘Text’ version of every page code even with Page Builders to see if there is an image tag with that title / alt and edit it in text mode just in case. Else there would probably be an option somewhere when you actually add the image through the builder that overrides the default WordPress alt text that you are setting through the upload.

    Best regards,
    Konstantinos

    Hello,

    I’ve encountered this before and for me, it’s usually depended on which page builder is being used.

    If you go to the page in the WordPress backend and open the box you may have used to insert an image, do you have an option there for Image Alt Text? No in the Media section of WordPress, but as part of the page builder? Sometimes it’s easy to overlook, especially when using something like Divi.

    Hope that helps!

    [Signature moderated]

    • This reply was modified 7 years, 8 months ago by Andrew Nevins.
    Thread Starter cag8f

    (@cag8f)

    Thanks for the reply.

    >> Might there be a cache plugin ? If yes don’t forget to purge the cache it might not be done automatically so you still see the previous page cached.

    No, there’s no caching plugin.

    >> How do you add the image on the page? Through a Page Builder ( like Visual Composer for example ) Or is it just a plain post?

    Neither. The image is added onto the page via a custom section in the back-end. I’m not sure how to describe it. I’ll try: If I open the page in-question for editing in the WP back-end, there is a section on that page that appears to be custom created for our company (screenshot). This section is part of my theme, and exists both in my child theme and if I switch to my parent theme. As you can see in the screenshot, this section contains information unique to our company (“Horizon Residences” and “Horizon Villas”). So somewhere in the back-end these fields have been set.

    >> Else there would probably be an option somewhere when you actually add the image through the builder that overrides the default WordPress alt text that you are setting through the upload.

    I do indeed add the image via this special section in the back-end, and when I do so, I specify my desired alt text (screenshot). But that does not take–something is overriding it.

    Thanks!

    Thread Starter cag8f

    (@cag8f)

    @steamerdevelopment, thanks for the reply.

    >> If you go to the page in the WordPress backend and open the box you may have used to insert an image, do you have an option there for Image Alt Text?

    Yes (screenshot). But when I specify my desired alt text, it doesn’t take–something overrides it.

    >> No in the Media section of WordPress, but as part of the page builder? Sometimes it’s easy to overlook, especially when using something like Divi.

    This WP install doesn’t use a separate page builder. The theme however has some page builder elements to it. And this image is inserted onto the page using one such element.

    The theme developer then has probably added the code to automatically take the ‘titles’ of the current properties view and adding them to the image alt/title texts as well as your images are probably simple metaboxes for this ‘post’. Either that or they are hard-coded.

    If there is a way for you to change the ‘Horizon Residences / Horizon Villas’ general title it would be a good way to test this theory if the images read the full titles.

    Unfortunately if this is true or if the titles are hard-coded it would require editing the theme’s code itself on which only the theme developer or you can do but without knowing the themes files though I don’t think I can be of any more help to be honest.

    Best regards,
    Konstantinos

    Thread Starter cag8f

    (@cag8f)

    @xkon, thanks for the reply.

    >> If there is a way for you to change the ‘Horizon Residences / Horizon Villas’ general title it would be a good way to test this theory if the images read the full titles.

    That sounds like a good idea. But where can I edit this title? I’m not sure where my theme has obtained the strings “Horizon Residences” and “Horizon Villas.” I cannot see where they have been added anywhere in the back-end. I’ve also done a text search for “Horizon Residences” (via grep) of all the files in my child theme, but it could not find anything. So I guess it is not hard coded anywhere. I’m now searching through the parent theme files for “Homepage Banner.” Maybe that can give me a good indicator of the file I need to edit.

    Are you able to alter the code from within the Editor?

    If you Inspect the image, you can see the alt text there in the code, so maybe do a Find within the appropriate Editor page and change it from there?

    Solid Gear Works

    Thread Starter cag8f

    (@cag8f)

    @solidgearworks

    >> Are you able to alter the code from within the Editor?

    No it does not appear so. The image is not added via the usual editor–it is added via some special custom-field-adder (for lack of a better term). Screenshot.

    Thread Starter cag8f

    (@cag8f)

    @solidgearworks, @xkon, @steamerdevelopment: Through some savvy (lucky?) grep-work, I’ve ascertained that the image is added via a plugin: Toolset Types. I’ve posted to their forums so hopefully I get a nibble there.

    Yes like I’ve said the image is just a custom meta for your page probably. The only way to change the output is to find the correct template .php file for this particular view and alter it’s code where it outputs the images OR there will be a specific title settings or something on the Toolset Types plugin as it can handle ‘templating’ etc.

    At least we made a start!

    Best regards,
    Konstantinos

    Thread Starter cag8f

    (@cag8f)

    @xkon

    >> At least we made a start!

    Yes indeed. Progress is good. Let’s just consider this resolved. If I have further issues, I can do more research into Toolset Types.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘How to edit alt text of a particular image?’ is closed to new replies.