Support » Fixing WordPress » changing alt tag

  • Resolved awkward_clam


    site is here:

    I’m trying to figure out how to change the alt tag on the featured images on the front page. It is by default changing them to the post title. The photos that I have uploaded have all the fields named “vancouver mortgage broker” but my question is where would I look to change the way this is automated?

    Thanks and Merry Christmas

Viewing 9 replies - 1 through 9 (of 9 total)
  • The alt can be changed in the picture uploader. Go here: and look at step 4.

    What I’m saying is that I’ve changed all of those fields to “Vancouver Mortgage Broker” but it’s showing up on the page as the post title for some reason.


    Is this a sort of featured image you are setting for the slideshow? Or are they the images embedded in posts?

    Yeah, it’s a featured image. So there is a featured.php in the editor..

    You are going to have to open the file, and find the line of code that loads the images, and change the part that sets the alt. It probably has it set to <?php the_title() ?>, change it to “vancouver mortgage broker”.

    It’s inside <div class=”slide”>.

    If you post here the code from <div class=”slide”> to </div> <!– end .slide –> I’ll be able to help you further.


    <div class="slide">
    						$post_title = get_the_title();
    						$thumbnail = get_thumbnail($width,$height,'thumb',$post_title,$post_title);
    						$thumb = $thumbnail["thumb"];
    						print_thumbnail($thumb, $thumbnail["use_timthumb"], $post_title, $width, $height, 'thumb'); ?>
    					<div class="description">
    						<h2><a>"><?php truncate_title(27); ?></a></h2>
    						<?php $tagline = get_post_meta($post->ID, 'Tagline', true);
    						if ($tagline != '' ) { ?>
    							<p class="tagline">“<?php echo($tagline) ?>”</p>
    						<?php } ?>
    						<p><?php truncate_post(375);?></p>
    					</div> <!-- end .description -->
    				</div> <!-- end .slide -->

    So there are a few $post_titles, not sure which one to change. Thank you so much.

    I think the line you need to change is this:

    $post_title = get_the_title();

    get_thumbnail and print_thumbnail are not a standard WordPress functions (at least none that I could find). Probably a plugin.

    My guess is that you could change it so that it uses your text, like this:

    $post_title = "your text here";

    If that’s not it, you should contact the plugin developers, and ask them.

    Hope this helps.

    Nice, that did it. I was afraid it was going to change the actual post title.


    Thanks a ton, you were really helpful this whole time.


    No problem!

    PS: Please change the status to “Resolved”

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘changing alt tag’ is closed to new replies.