Community Forums › Forums › Archived Forums › Design Tips and Tricks › Outreach Pro: Remove read more cutoff from first post only?
- This topic has 2 replies, 2 voices, and was last updated 9 years, 11 months ago by PLLHealthBlog.
-
AuthorPosts
-
May 12, 2014 at 5:25 pm #104764PLLHealthBlogMember
I don't want my entire blog page to consist of full posts nor all post excerpts. I'd prefer to have the first post in its entirety, followed by excerpts of the remaining posts on that page.
I found this on the wordpress.org codex:
<?php global $more; $more = -1; //declare and set $more before The Loop ?> <?php if (have_posts()) : while (have_posts()) : the_post(); //begin The Loop ?> <?php if ($more == -1) { //do not use the more tag on the first one. the_content(); $more = 0; //prevent this from happening again. use the more tag from now on. } else { //use the more tag the_content(__('Read more...')); } ?> <?php endwhile; //end of The Loop ?>
and they included this info: "It's important that if you're going to over-ride the default $more global variable you do it inside The Loop, but after your setup the post. If you're working with the standard Loop and using the_post(), make sure you set $more after the_post (but before the_content()."
I'm assuming I can't just plop that code in functions.php. I have less than a rudimentary knowledge of php, but from what I've seen I'm guessing it goes somewhere in /lib/structure/loops.php under the Genesis theme. However, I know not to edit the Genesis files and am clueless as to which files I need to import to the child theme and then how to make sure they're properly called upon where needed.
And while we're messing with the excerpts, does anyone know how to change the default "[...]" at the end of the excerpt to custom text and make it link to the post?
I would be SO grateful if someone could help with this! Thank you!
http://passionlifelovehealth.com/May 12, 2014 at 5:33 pm #104767Lauren @ OnceCoupledMemberQuestion 1: One full post followed by excerpts - look up the Genesis Grid Loop. There are a few alternatives out there, too, one of which is a plugin.
Question 2: Change the default "[...]" - this should be on the Genesis Snippets page. I think there are two functions (depending on how the excerpt is called).
Best,
Lauren
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
May 12, 2014 at 6:47 pm #104787PLLHealthBlogMemberThanks for your response, Lauren! I didn't quite understand your tips (I found the Genesis Grid Loop, but had no idea what to do from there! Same with the Snippets...since I can't just edit that file because it's the parent theme, if I upload an edited version to the child theme, I'm not sure if I need to change anything elsewhere to make sure that file is called upon). Buuuut since you mentioned a plugin, I went a-hunting and finally found one! I'm slightly bummed because I really like to do things via code rather than plugins, but given my limited php knowledge (for now), it's probably for the better. Thank you again for taking the time to respond!
-
AuthorPosts
- The topic ‘Outreach Pro: Remove read more cutoff from first post only?’ is closed to new replies.