[Resolved] Can I stop a featured image acting as a link?

Home Forums Support [Resolved] Can I stop a featured image acting as a link?

Home Forums Support Can I stop a featured image acting as a link?

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #653194
    Hakim

    I have a published post whose tile on the home page has three elements: the post title, a featured image, and an excerpt which is coded as a link to an external site.

    Selecting the title or the excerpt takes me to the external site in a new tab which is the desired behaviour.
    However selecting the featured image takes me to the post which only has a link to the external site which then functions as above.

    Is is possible to change the behaviour of the image to either do nothing when selected or, ideally, to have the same behaviour as the other two elements?

    The site is https://inayatiorderaustralia.org/ and the post is “Sufis: Islam’s musical mystics”.

    With thanks,
    Hakim

    #653564
    David
    Staff
    Customer Support

    Hi there,

    if it is just that single post you want to apply it to you could simply do this:

    #post-1280 .inside-article .post-image {
        pointer-events: none;
    }
    #653822
    Hakim

    Thanks David but this doesn’t seem to do anything.

    Have copied and pasted code into the Simple CSS box and updated the post, flushed cache, exited and reloaded the browser and all is the same.

    The post format was set as a link – changed that back to standard and that just lost the title functioning as a link so the post has been returned to link.

    Any suggestions?

    Hakim

    #654191
    David
    Staff
    Customer Support

    Can you add the CSS back in so i can see why it isn’t working. And try placing it above any other CSS you may have in there.

    #655318
    Hakim

    Hi David,
    I didn’t remove the css.
    The only css on the post is the copied and pasted:
    #post-1280 .inside-article .post-image {
    pointer-events: none;
    }

    In Appearance -> Simple css is:
    h2.entry-title {
    text-align: center;
    }

    Thank you for your interest in this.
    Hakim

    #655458
    David
    Staff
    Customer Support

    Hi there,

    can you add the code to the Appearance > Simple CSS instead of to the actual post.

    #655512
    Hakim

    Yes, that works.

    The ideal solution would be if the featured image could be configured to use the link the title above and the link below which go directly to the desired remote site.

    For selecting the featured image to do nothing is probably worse than taking visitors to the page and selecting the link manually.

    Thanks David. I will mark it as resolved. I got the solution I asked for but it turns out not to be what I actually want 🙁

    All best wishes and thanks for your input.
    Hakim

    #655541
    David
    Staff
    Customer Support

    You’re welcome.
    If you want to share the current code you have for the redirect we could look at expanding that so all the links are covered. Let me know.

    #655562
    Hakim

    This is the link used in the text under the photo:

    #655572
    David
    Staff
    Customer Support

    Oh ok, so you may want to look at this plugin especially if you may want to add more external posts:

    https://wordpress.org/plugins/page-links-to/

    It makes the process easier than targeting them individually. Let me know.

    #655592
    Hakim

    Thanks David, I will check out the plugin.

    Much appreciated input from you.
    Hakim

    #655625
    David
    Staff
    Customer Support

    You’re welcome 🙂

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.