Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other [WORDPRESS] Featured images does not link to single page

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #45423
    luchid
    Participant

    Hi, I am trying to build my portfolio and I need to put over Featured Images some text but when the text is displayed, the featured images does not link to single page anymore. Please, is there a way to fix this?Thank you very much!

    #138198
    Paulie_D
    Member

    We’d need to see it in action. The PHP is of no use to us.

    We need the HTML & CSS…could you put the output into a reduced case in codepen?

    However, what I think you are after is: `pointer-events:none`

    http://robertnyman.com/2010/03/22/css-pointer-events-to-allow-clicks-on-underlying-elements/

    #138197
    luchid
    Participant

    Hello, I replaced the code in my discussion. Sorry about that.

    #138216
    Paulie_D
    Member

    That’s way too much to wade through, hence the request for a Codepen.

    #138200
    luchid
    Participant

    Thank you very much, Paulie_D, it works now with pointer-events:none. This is great!

    Thanks again!

    #138288
    luchid
    Participant

    Hello, this is my code.
    I understand that the click does not work in WordPress because of the overlay I used but I have small experience in coding and I do not know how to change the code to make the click work. Thank you very much!






    My Portfolio



    #138291
    chrisburton
    Participant

    Might this be caused by absolute positioning? Try setting a z-index.

    Although, adding the above code in codepen, it seems to be linking.

    #138292
    luchid
    Participant

    Thank you, I will try it.
    The problem is when transferring the code into WordPress. I need to use Featured Images and because the overlay the image does not link anymore to single post.

    #138294
    chrisburton
    Participant

    Well, it would be best if you posted exactly what WordPress outputs instead of changing the href to have a `#` value. If that’s what you’re getting, your PHP is the cause. Otherwise setting a z-index sounds like the answer here but post back with your findings, including the code WordPress is outputting.

    #138434
    luchid
    Participant

    In order to allow click under the overlay, I added a class to the image link and gave this style:
    > .image link {display: block; width: 100%; height: 100%; position: absolute; top: 0; left: 0; text-indent: -9999px; }

    Also, to the image itself and to the .work figure:hover dl I added display: block.
    Though I think I complicated myself, it works.
    Thanks for helping me figure out.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘Other’ is closed to new topics and replies.