• Resolved sonic1243

    (@sonic1243)


    Hi there, great plug in thank you.
    I wanted archive images to be links; so I added the second bit of code suggested here, which works great, except that it messes with your widget plug in, removing the link from the titles. https://www.wpbeginner.com/wp-themes/how-to-automatically-link-featured-images-to-posts-in-wordpress/
    So the plugin continues to work as normal, except on archive pages where the “is_singular” exception occurs, and then the titles in RPW stop being links.
    If you visit the site I’m working on you’ll see this problem occur by using the category widget to visit an archive page.
    Any ideas or solutions would be wonderful, thank you…

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • un subscribe please

    Plugin Author Martin Stehle

    (@hinjiriyo)

    @lestexas60 I can not do this for you, but you can go to the plugin’s forum page and click on “Unsubscribe from this plugin”.

    Plugin Author Martin Stehle

    (@hinjiriyo)

    @sonic1243 The snippet as provided in the page you linked adds the additional A element to all displayed featured images of a not-singular page. The HTML code becomes invalid, as shown in the shorten form:
    <a><img><span>Fashion In Lockdown</span></a>
    becomes
    <a><a><img></a><span>Fashion In Lockdown</span></a>
    Nested A elements are not allowed, so the second A element is ignored. And the first A element is closed to early, before the link text, hence the text is not shown as a link.

    I don’t know how to detect a featured image of a post content and of a widget, sorry

    • This reply was modified 4 years, 6 months ago by Martin Stehle.
    Thread Starter sonic1243

    (@sonic1243)

    OK thank you! Glad to have found a challenge!
    I’m not a php coder so haven’t a clue really, but if I can find a way I’ll post it here.
    Thank you ….

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Added one thing, broke another…’ is closed to new replies.