Home Forums Themes Support Formota Haru Blog: Feature Image link to post

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #8633
    speedograph
    Supported

    Hi,

    I would like to know how to link feature images to post?

    I am using the option “Haru Blog” element included in the Wpbakery page Builder. At this point, only titles are clickable. But i would also like to link feature image from single posts to the post pages.

    Thank you

    #8637

    Hi,
    Thanks for contacting us and choosing our product!
    In this case you can use custom template to add image link follow this topic:

    How to customize WordPress theme using Child theme


    The template for customize is: wp-content/plugins/haru-formota-core/templates/blog/masonry.php
    You can change the code on line 55 from:
    <?php echo get_the_post_thumbnail( $post_id ); ?>
    to

    <a href="<?php the_permalink() ?>">
       <?php echo get_the_post_thumbnail( $post_id ); ?>
    </a>

    Hope this helps!

    *****
    Regards,
    HaruTheme

    #8638
    speedograph
    Supported

    Hi Thanks for reply,

    I already have this code in the masonery.php line 55 to 60.

    <div class=”post-thumbnail”>
    <div class=”post-image”>
    “>
    <?php echo get_the_post_thumbnail( $post_id ); ?>

    </div>
    </div>

    But it doesn’t work. On click, the feature images doesn’t link on post.

    Thank you.

    #8639

    Hi,
    You need to insert a tag wrap image.
    Please send us your site URL and admin account. So we can check the issue for you.

    ***

    #8643
    speedograph
    Supported
    This reply has been marked as private.
    #8644

    Hi,
    We already wrote very detail above with file URL and what you need to change.
    You can use this plugin for easy to edit:

    File Manager


    Also please update theme and Haru Formota Core plugin to the latest version before do it follow this topic:

    How to update WordPress theme Automatic from ThemeForest


    Hope this helps!

    ****
    Regards,
    HaruTheme

    #8651
    speedograph
    Supported
    This reply has been marked as private.
    #8652
    speedograph
    Supported
    This reply has been marked as private.
    #8654

    Hi,
    If you read our reply carefully we said change the code from:
    <?php echo get_the_post_thumbnail( $post_id ); ?>
    to

    <a href="<?php the_permalink() ?>">
       <?php echo get_the_post_thumbnail( $post_id ); ?>
    </a>

    that means you need to replace the code.
    However if you are using Home 4 and use shortcode Haru Recent New shortcode you need go to: wp-content/plugins/haru-formota-core/templates/recent-news/ then open file carousel.php and go to line 52 and replace the code from:

    <div class="post-image">
        <?php the_post_thumbnail(); ?>
    </div>

    to

    <a href="<?php the_permalink() ?>">
      <div class="post-image">
       <?php the_post_thumbnail(); ?>
      </div>
    </a>

    You can do it via child theme.
    Hope this helps!

    ****
    Regards,
    HaruTheme

    #8656
    speedograph
    Supported
    This reply has been marked as private.
    #8657

    We make sure you changed incorrect because we checked your site and don’t see any a tag added:
    https://prnt.sc/125h9rg
    If you update theme and plugins to the latest version, we changed it here:
    https://prnt.sc/125hcj9

    ****
    Regards,
    HaruTheme

    #8658
    speedograph
    Supported
    This reply has been marked as private.
    #8660

    1. Please make sure you insert in correct file by edit it direct in the plugin file (not in child theme)
    2. If your server have cache please clear it
    3. If you can’t send us your site account to check, you should check it yourself. We don’t see any issue in this case.

    ***
    Regards,
    HaruTheme

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.