New Topic

Clickable featured images at category view + read more button

Home › Forum › Customization › Clickable featured images at category view + read more button

This topic contains 5 replies, has 2 voices, and was last updated by  StartupWP 3 years, 10 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2229

    kezdovega
    Participant

    With your help i could manage to have images in category view. Now i really would love to have them clickable (for the articles). Is there any way to do that?

    http://noiessegszivarvanya.hu/blog

    Also is there a way to have buttons under the excerpts linking to the articles with a hungarian read more text in them?

    #2231

    StartupWP
    Keymaster

    Referring to https://startupwp.com/topic/featured-images-in-category-view/, wrap:

    <?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } ?>

    With:

    <a href="<?php the_permalink(); ?><?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } ?></a>

    Then, you can simply manually add the read more here too:

    <a href="<?php the_permalink(); ?>Olvass Tovább</a>

    #2235

    kezdovega
    Participant

    These do not work for me :(

    I replaced the post thumbnail line with the new one in the entry-summary.php within the child theme, the images disappeared.

    When adding the read more line all that changed that the tags went up beside the image (which is very nice tho :D ), and got a Blog (with link) which is the category:
    http://prntscr.com/70sb3m

    #2237

    StartupWP
    Keymaster

    Please share your code for entry-summary.php.

    #2239

    kezdovega
    Participant
    <section class="entry-summary">
    <?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } ?>
    <?php the_excerpt(); ?>
    
    <?php if ( is_search() ) { ?><div class="entry-links"><?php wp_link_pages(); ?></div><?php } ?>
    </section>
    
    #2240

    StartupWP
    Keymaster

    Have you tried?:

    <section class="entry-summary">
    <a href="<?php the_permalink(); ?><?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } ?></a>
    <?php the_excerpt(); ?>
    <a href="<?php the_permalink(); ?>Olvass Tovább</a>
    <?php if ( is_search() ) { ?><div class="entry-links"><?php wp_link_pages(); ?></div><?php } ?>
    </section>
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.