• Resolved avviano

    (@avviano)


    Hi Faiyaz, first off, thank you for your very cool plugin!

    I was able to set it up nicely, but I have one problem:

    I have a custom post type called “albums”. I am trying to make the feature image link to the individual posts within “album”. When I choose the menu item “Module Link URL” I want to choose a dynamic post type “Album”. But I cannot. I can only choose a link to a specific post ID within “Album”. Then all my images point to the same post. I want every image to link to the correct post. For some reasons that does not work. How can I do it? Can I add some PHP code? Where would I do it?

    I have the post title below the image. The post title links correctly to the right post. All I want is to get the image to do the same. That would be perfect!

    Thank you so much,
    Cheers, W

    • This topic was modified 6 years, 2 months ago by avviano.
    • This topic was modified 6 years, 2 months ago by avviano.
    • This topic was modified 6 years, 2 months ago by avviano.
    • This topic was modified 6 years, 2 months ago by avviano.

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Faiyaz Vaid

    (@vaidfaiyaz)

    Hi @avviano

    Until new release you can use following jquery tweak to make the link work.

    jQuery(document).ready(function() {
    if(jQuery(‘.et_pb_fh_post_carousel_image img’).length) {
    jQuery(‘.et_pb_fh_post_carousel_image img’).click(function() {
    var parent = jQuery(this).parents().closest(‘.et_pb_fh_post_carousel_container_inner’);
    var link = parent.find(‘.et_pb_fh_post_carousel_title a’).attr(‘href’);
    if(typeof link !== “undefined”) {
    window.location.href = link;
    }
    });
    }
    }

    Also add this CSS

    .et_pb_fh_post_carousel_image img {
    cursor:pointer;
    }

    Let me know if it is not working.

    • This reply was modified 6 years, 2 months ago by Faiyaz Vaid.
    Thread Starter avviano

    (@avviano)

    Hi Faiyaz,

    I tried your script and of course I added the script markups. But it does not work.

    I left the script in the header so you can take a look for yourself. I can see the mouse pointer over the image, but when I click on it nothing happens.

    I do not know what piotr was referring to when he said to change the quotation mark. All looks good to me…

    https://seaofsin-official.com/albums/unbroken/

    Thanks for your help,
    Walter

    Plugin Author Faiyaz Vaid

    (@vaidfaiyaz)

    Hi @avviano

    Can you please replace ā€˜ quotes of script with ‘ single quote as it seems to be something went wrong with copy paste. Please try to replace quotes and let me know if script is working or not.

    Thread Starter avviano

    (@avviano)

    I replaced all the quotes, but still, when I click on the image nothing happens. The post title links correctly. The image doesn’t do anything.

    Plugin Author Faiyaz Vaid

    (@vaidfaiyaz)

    Hi @avviano

    Thanks for letting me know and sorry there is minor mistake in code. You can replace with this code.

    <script>
    jQuery(document).ready(function() {
        if(jQuery('.et_pb_fh_post_carousel_image img').length) {
            jQuery('.et_pb_fh_post_carousel_image img').click(function() {
                var parent = jQuery(this).parents().closest('.et_pb_fh_post_carousel_container_inner');
                var link = parent.find('.et_pb_fh_post_carousel_title a').attr('href');
                if(typeof link !== "undefined") {
                    window.location.href = link;
                }
            });
        }
    });
    </script>
    Thread Starter avviano

    (@avviano)

    Awesome Faiyaz – now it works just perfectly! Thanks again for your help and good luck with your upcoming release…

    Plugin Author Faiyaz Vaid

    (@vaidfaiyaz)

    @avviano

    Thank you so much and I am glad to know that it is working fine now. Please don’t forget to rate 5 star if you like the plugin. Rate it and motivate me because it is free of cost. šŸ™‚

    Hi Faiyaz.
    Your work around helped me too.
    Awesome Plugin!!!
    Thanks you.
    Chris

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Feature Image Link not working’ is closed to new replies.