Ilse
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Setting up a Child theme – functions.phpSorry, had to read your reply 5 times and still haven’t got a clue were to start. Where should I place
the_post_thumbnail('thumbnail');
orthe_post_thumbnail('medium');
? In the content.php?Output the img tag? .. The call still needs to be within the loop context?
..accepts a post argument? Echo out the return… well you got the idea..This is a ‘bit’ too technical for me ??
- This reply was modified 3 years, 9 months ago by Ilse.
Forum: Developing with WordPress
In reply to: Setting up a Child theme – functions.phpI’ve managed to set up a working 2017 child theme. Then replaced:
get_template_part( 'template-parts/post/content', get_post_format() );
with:
get_template_part( 'template-parts/post/content', 'excerpt' );
in index.php Line 45 and archive.php Line 40 – as I found elsewhere on this forum.You should have heard the loud YES!!! that almost woke up the entire household at 2AM when those excerpts showed up nice and shiny after refreshing ??
Next challenge: show a thumbnail next (or above/below/..) to the blog archives page (preferably the blog panel on the homepage as well). I noticed a lot has been written about it already but I have a more specific question: I would like to have a thumbnail image (or a cropped version of the feature image of the specific blog post) but not show the feature image on the top of my blog page.
I’ve tried to add to the template-parts > post > content.php:
<div class=”entry-content”>
<?php
get_the_post_thumbnail();
the_content(
sprintf(
/* translators: %s: Post title. */
__( ‘Continue reading<span class=”screen-reader-text”> “%s”</span>’, ‘twentyseventeen’ ),
get_the_title()But it doesn’t do the trick, even though a feature image for certain posts has been defined. Is there any (simple) way to show a thumbnail, and not show the feature image on the blog post? (assuming the thumbnail is based on the feature image).
Thanks for the help (and yes, I realise I’ve drifted away from my initial problem.. but hope someone can help pointing me in the correct direction). Merci ??
Forum: Developing with WordPress
In reply to: Setting up a Child theme – functions.phpThank you the both of you. I’ve never done anything with PHP (or coding in general) so I’ll try to keep that Pandora’s box lid as closed as possible ?? but open to learning!
Basically, I’m just looking for a way to create a child theme to be able to show only the excerpt of my blog posts on my blog page instead of showing all my blog posts in full length. The excerpt field in the blog itself doesn’t seem to do the trick (I understood not showing excerpts is a default 2017 setting).