Well… since you mentioned the_exceprt()… What happens if you modify your theme’s page.php to use that instead of the_content()? I’ve never tried that, but it seems like worth a shot.
Thread Starter
xtoq
(@xtoq)
That would work for a post, not a page. But the_excerpt() doesn’t work for pages.
Ok, I just tested it. You’re right. Close… but no way to get the rest of the page. Which, upon rational thought, makes sense.
Sorry for the bum steer.
Thread Starter
xtoq
(@xtoq)
That’s cool. Its too hard to search all the plugins for what I’m looking for, so I’m hoping that someone happens to know one that will work, or that its a really simple hack.
Yeah, I can think of a simple work-around. Might get tedious if you have LOTS of these though…
Option 1)
Create Page1 and for the content, have your short version. Include a link in that content for a Page1.1.
Create Page1.1 as a child page of Page1 and have the full content on it.
Granted, this assumes your theme only shows one level of Pages.
Option 2)
Does the <!-- NextPage --> tag work with pages? That’d be a way to initially show an intro paragraph and use the built in “paging” to navigate to the rest of the page.
I couldn’t test this one as my theme (currently) doesn’t support the next page thing (more on that here)
This would get you 50 characters of the post_content for your Pages. Too bad Pages don’t have excerpts.
<?php
$pages = get_pages('');
foreach($pages as $page) :
?>
<li><?php echo substr($page->post_content,0,50) ?></li>
<?php endforeach; ?>
Well, Pages do not have an excerpt input field… but if you use the_excerpt and the_content in the page.php template – WP will display the default 200 words or so from the beginning of the post AND the whole post.
To achieve something similar as in the example quoted by the OP, I assume you could alter the page-new.php in your admin (Warning: modifying core files is not healthy!) to add the excerpt field, then having both the excerpt and the content in your page.php template… then put the excerpt in its own div class=”yellow”… etc.
On the other hand, you could probably get the same result with the custom fields, especially if you don’t use them for anything else.
Thread Starter
xtoq
(@xtoq)
moshu & MichaelH: I really wanted to be able to write a summary that was not the first x words or so of the post, to avoid repition. Also, these pages are reprints of articles that others have written, and they aren’t always, uh, to the point in the first 50 characters. Also, I use custom fields for other things; mainly the rc-custom-fields plugin, so that probably won’t work.
HandySolo: Option 1 won’t work, b/c I use my parent pages as “category” pages, and it would get too crazy. Regarding option 2, I’ve seen some pagination plugins, but I don’t know if they work for pages.
Regarding my option 2: I’m pretty sure that’s all built-in to WP2.0. Check the link I provided about how to “theme enable” it and give it a shot.
Thread Starter
xtoq
(@xtoq)
Okay, that kind of does what I want. Now, 2 more things [I know, its always something more (= ]…
That kind of does what I want. Is there any way that I could 1) show the “summary” on the same page (per the example) or 2) pull the child “summaries” up on a parent page?
Thread Starter
xtoq
(@xtoq)
Never mind, found a plug-in that works. Thanks though!
Page Friendly Excerpt