![]() |
Wordpress question...
Posts on Engadget's main page will sometimes be a summary of the main article, maybe 150 words or so. Clicking Read More or the post's title will open the page that has the 1200+ word full article.
How do I that in Wordpress? |
<!--more-->
|
If the theme allows excerpts you use that field.
Otherwise, there is a button that lets you insert a read more line. |
Code:
<?php the_excerpt(); ?> |
Quote:
|
you should just have a button that will break your post for you...
|
Do you want excerpts on your index page? You may need to modify one (or more) files of your theme if you're currently not getting that. It's very easy, though.
I'm gonna assume you want it on your index page and that at present time your index page displays full length posts. You will need to open your theme's Main Index Template file (index.php), search for the_content() and change it to the_excerpt. Voila... instead of having full posts on your front page, you will have excerpts. Of course, if you are using a caching plugin (such as WP Super Cache), you may need to dump the cache in order to see the changes. |
Quote:
|
Quote:
more - <!--more--> WordPress tag that breaks a post into "teaser" and content sections. Type a few paragraphs, insert this tag, then compose the rest of your post. On your blog's home page you'll see only those first paragraphs with a hyperlink ((more...)), which when followed displays the rest of the post's content. :pimp |
If you want it to work like the first article on http://www.gotbuddy.com/ use the code I pasted where you want the break.
|
Quote:
PHP Code:
|
Quote:
Open loop.php and find this: <?php the_content(); ?> Replace it with this: <?php the_excerpt(); ?> When you make a post, the index page will show an abbreviated version of the post text. For a better result: When you finish your main post (in the WP editor), scroll down and enter an abbreviated version into the "Excerpt" field. Your front page will have a brief description, your main post will have the full text and content. |
Quote:
Thanks. I tried pasting <!--more--> into the post and that didn't do anything except for make that tag appear in the post itself. When I hit the "More" button on WP, that did the trick. Sweet. |
Quote:
|
Yeah, manual except is probably your best bet (see garce's post), even though it requires an extra step you will need to take each time you are making a new post. However you can manually create your excerpt (and you can add formatting to it), whereas the automatic one truncates the text (sometimes cutting off the sentence at a wrong spot) and strips all formatting.
|
Quote:
I figured the Excerpt function was something I'd have to enable externally from the post itself. |
Quote:
|
A big :thumbsup to the OP and everyone who responded, I was gonna be
looking today on how to do this on my own blog, and you guys hooked me up already, awesome. Seems easier than I would of thought, thanks again. |
<!--:1orglaugh-->
|
All times are GMT -7. The time now is 12:55 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123