New Topic

Clickable featured images at category view + read more button

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

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #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 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.