Replies: 1
Hi. I made a blog website for my professor-client, linked but you probably won’t see anything because it is only for registered users, who are people he knows personally.
Anyway we are using the illustratr theme (as child). I’m not above changing themes, but our needs are simple and I want to learn development anyway.
Issue: Home page displays list of posts (good) but contains the full post content (bad). This is so even though in settings>reading I saved “For Each article in feed” show ‘summary’;
Also, I created a front-page.php file (Illustratr doesn’t have this; It only has index.php ) In that front-page.php file, I first changed a key reference, by cloning the content-page.php file and renaming it to content-excerpt.php and changed “the_content()” to “the_excerpt” and then in front-page.php I changed the name portion of the get_template_part function from get_post_format() to ‘excerpt’. It looks like this
// get_template_part( 'content', 'excerpt' ); /// displays excerpt on front page
get_template_part( 'content', get_post_format() ); ///displays full content on front page
It works does some of what I want. It does display only the excerpt on the home page, and all the content on each post’s page, but it kills the hyperlink in the post title on the home page, so they can’t get to the post’s page. Also it would be awesome to have a read-more option or a link below the post, not just in the title, but that might be out of range here.
I’m happy with the easiest solution. I’d like to avoid the need for a plugin if possible. I’m learning how to develop so I don’t mind issues like this as gateways to learning but also it would be nice to solve it. I learned a lot already just from this issue, like about the existence of post formats and the get_template_part() function and so on.
Thank you all for your help.