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.
- AuthorPosts
- April 25, 2015 at 4:23 AM #2229
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?
April 25, 2015 at 11:47 AM #2231Referring 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>
May 2, 2015 at 1:33 PM #2235These 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/70sb3mMay 6, 2015 at 3:13 PM #2237Please share your code for entry-summary.php.
May 7, 2015 at 9:55 PM #2239<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>
May 8, 2015 at 11:38 PM #2240Have 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>
- AuthorPosts
You must be logged in to reply to this topic.