Featured image linking directly to a Page

resolved (17 posts) (10 voices)

  1. VR360
    Member

    Please, how can I link a featured image directly into a page ?
    So when the visitor click on the featured image, it doesn't open it, but opens an html page.

    For example, I need to link the featured image of this post:
    http://www.vr360.com.br/2011/11/21/foto-aerea-360-graus-heliponto-do-edificio-copan/

    To this link:
    http://www.vr360.com.br/tour360/Copan.html

    Thank you !

    Posted 5 years ago #
  2. Elliott
    Support

    Hello VR360,

    You can disable the image when editing the post, http://mysitemyway.com/docs/index.php?title=Post_Options#Disable_Featured_Post_Image.

    And then insert your own with our image_frame or fancy_images shortcodes.

    <a href = '#'>
    [image_frame link_to = "false" prettyphoto = "false"]
    </a>
    Posted 5 years ago #
  3. robsteed
    Member

    I would like to do the same thing here.

    The solution you suggested means not having an image at all. What I'd like is that when you click on an image it goes to the post. I don't want any image within the post, so need to use the featured image option.

    Posted 5 years ago #
  4. Elliott
    Support

    Are you talking about your portfolio page? There is an option for that when editing the portfolio post, http://mysitemyway.com/docs/index.php/Using_the_Portfolio#Link_to_Post.

    Posted 5 years ago #
  5. robsteed
    Member

    Yes I found that, but I'm talking about a blog index page restricted by category: http://joriches.com/case-study-library/

    I am using this shortcode: [blog_grid column="4" showposts="12" post_content="excerpt" category_in="89" disable="meta"]

    Posted 5 years ago #
  6. Elliott
    Support

    Try adding this on line 58 in /wp-content/themes/[your_theme]/lib/functions/image.php,

    if (is_page()) { $link_to = get_permalink(); $prettyphoto = ""; }

    Posted 5 years ago #
  7. robsteed
    Member

    Hi Elliot,

    That killed the whole site, but it's entirely possible that this was because I'm not skilled enough to do this.

    Is there a way of using the additional code fields within the WP-admin to do this rather than let an idiot like me loose on code?

    Posted 5 years ago #
  8. Elliott
    Support

    Download the attached zip file and extract into /wp-content/themes/[your_theme]/lib/functions/.

    Attachments

    1. image.zip (4.1 KB, 27 downloads) 5 years old
    Posted 5 years ago #
  9. robsteed
    Member

    Hi.
    Nope, it still links to the image.

    Posted 5 years ago #
  10. robsteed
    Member

    Hang on - ignore that last post.
    All sorted. Thanks

    Posted 5 years ago #
  11. wouthe
    Member

    Thanks for that!

    It might be a good idea to implement this option in the theme options. I think a lot of people want this.
    Keep up the good work.

    Posted 5 years ago #
  12. jfdion
    Member

    This works great for me too!

    I also think it would be a very good idea to add this function in your themes in the near future.

    Posted 5 years ago #
  13. ammonlee
    Member

    I've noticed that when the blog posts are on the home page then clicking on the picture takes you to the blog post. It does seem like this would be something you could enable for other pages as well.

    Posted 5 years ago #
  14. Awesome. Thanks for the function tweak. I would like to echo the sentiments that this would be a nice option to have. It's odd that this is an option for portfolio posts but not blog posts. Nonetheless the file above did the trick.

    Thanks,

    Ryan

    Posted 4 years ago #
  15. webmasterobservatoriobioetica
    Member

    After many hours of searching I finally found the solution!

    thank you!

    Posted 4 years ago #
  16. sparkwoodand21
    Member

    Excellent. I've found the solution as well.

    Another vote for implementing this into your next update please.

    Posted 4 years ago #
  17. motionmanager
    Member

    Thank you worked well! Would be great if you could implement it!

    Posted 2 years ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme