[resolved] feaured image linking but I have one giant permalink (4 posts)

  1. Miz.Michele
    Posted 3 years ago #

    I've been having a lot of problems trying to get the featured image to link to the post. I finally got it but now the entire excerpt is a giant permalink

    this is the line I'm having issues with

    [please mark any code according to the forum guidelines - http://codex.wordpress.org/Forum_Welcome#Posting_Code ]

    $title = get_the_title();
    	the_post_thumbnail(array($width,$height), array('alt' => $title));

    I replaced it with

    [the code below is corrupted - please re-post it]

    $title = get_the_title();
    	?><a>"><?php the_post_thumbnail(array($width,$height), array('alt' => $title));?><?php;

    and now the image goes to the permalink and so does the excerpt

    Any ideas? I'm stumped

  2. Michael
    Forum Moderator
    Posted 3 years ago #


    you have possibly forgotten to add the closing link tag </a> after the featured image.

  3. Miz.Michele
    Posted 3 years ago #

    Thanks but I am not sure where to add instead of the php at the end or before it? I am so sick of getting parse errors - -)

  4. Miz.Michele
    Posted 3 years ago #

    I did it and it did work - no more giant permalink

    Thanks a lot

Topic Closed

This topic has been closed to new replies.

About this Topic