Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi Denis, I’m not familiar with the Headway framework but is sounds like you need to ask support over at headwaythemes.com because changes to functions.php will probably get overwritten with their next upgrade. Unless it is a child theme…

    The only thing that is needed for it to work with Easy FancyBox is that the link target is changed from the post URL to the full image URL. After that, the auto-detection of Easy FancyBox should be able to take care of the rest. If not, then the link needs an extra class=”fancybox” and is should work.

    Thread Starter DenisCGN

    (@deniscgn)

    Hi Ravan,
    I got a child-theme an I can use my own functions.php.
    Is there a function that replaces the postlink (permalink) to the FULL image? And where can I find it.
    Thanks a lot,
    Denis

    Oh hang on… are you saying these posts do not have any content except for the (featured) image? In that case, you might be able to make it work without modifying your theme.

    Install, the plugin Page Links To and use that to (manually) change the URL of each post to the related full image URL.

    Thread Starter DenisCGN

    (@deniscgn)

    This is a good plugin, but I cant use it, cause I got a FrontEnd User Pro formular to let visitors upload, an image.

    So I need to have a solution that replaces the featured image link.

    Right now I got someting like this, but I dont know how to put it into the functions.php

    <?php
     if ( has_post_thumbnail()) {
       $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
       echo '<a href="' . $large_image_url[0] . '" title="' . the_title_attribute('echo=0') . '" >';
       the_post_thumbnail('medium');
       echo '</a>';
     }
     ?>

    This code example can be useful but not in functions.php… In fact I doubt you need to modify functions.php at all. You’ll probably have to look inside the usual template files.

    These featured images appear on the front page? Then you might look inside the parent theme for index.php or home.php or front-page.php and you might find that the actual part that creates these linked featured images is inside a file like content.php… In any case, you will then want ot copy that file over to your child theme and modify it to use the $large_image_url[0] as your code example does.

    But it all depends on how the Headway framework is set up. As I said: I have no idea so you might want to ask the Headway guys.

    Thread Starter DenisCGN

    (@deniscgn)

    Hey Ravan,
    I found the code, and I changed it.
    It works.
    Thanks for helping!
    Denis

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Featured Image’ is closed to new replies.