• Hello,

    I created a shortcode to make my featured images display in place of entry titles, but on the homepage I’ve lost the functionality for my featured images to link to its post.

    https://alexgunderman.com/

    Notice how hovering over my featured images won’t link you to the post? How can I fix this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    there’s no href wrapping the image. Please show your code for the shortcode you use to put the featured image on the page.

    Thread Starter alexgunderman

    (@alexgunderman)

    I used the shortcode [featured-img] for the entry header hook.

    I know there’s no href wrapping the image, but how can I automatically get my posts to link to the correct page?

    For example, If I used <a href="alexgunderman.com/miscellaneous">[featured-img]</a> to link to my miscellaneous post, then each of my featured images would link to it.

    But I don’t want that. I want Miscellaneous to link to Miscellaneous, Travel the World to link to Travel the World, and so on.

    How do I do that?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Aha… If your home page is using the_excerpt, that link is probably stripped off.

    I used the shortcode [featured-img] for the entry header hook.

    The entry header hook? It appears you’re using Genesis, a commercial theme. We really can’t support commercial themes here. Your best bet for help for Genesis specific features is https://my.studiopress.com/ I do not have any access to that site.

    Thread Starter alexgunderman

    (@alexgunderman)

    Ok, thank you for the help.

    @alexgunderman: Earlier, sterndata asked you to share the code of your shortcode function, so can you do that now? (It looks to me as though it doesn’t actually include the necessary code to link the image to the post.)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Featured image won't link to its post’ is closed to new replies.