![]() |
|
| |||||||
| Notices |
| WordPress - The Ultimate Blog WordPress is a personal blog publishing tool with focus on aesthetics and featuring cross-blog tool, password protected posts, importing, typographical niceties, multiple authors, bookmarklets. This is a very cooool tool! |
![]() |
| | Thread Tools |
|
#1
| ||||
| ||||
|
Hi Guys, I have just made a few posts on my new site www.techinfo-4u.com You may see the most recent one I have is a longer one than the others and instead of just showing the first couple of lines, and then you requiring to click on the heading to view the rest of it, It actually just shows the whole post and pushes the rest way down the bottom, It used to be like this sites www.windows7news.com My old wordpress blog didn't to what my new one is doing, there must be a entry that i can change the set the max number on lines that are displayed on the homepage per post, but i just cant figure out which one, Any one any ideas? Thanks so much |
|
#2
| |||
| |||
|
In index.php, and wherever else you have the_content() except the single post where it should be the_content(), after your permalinks, add the following: <?php if (is_singular()) : ?> <?php the_content(); ?> <?php else : ?> <?php the_excerpt(); ?> <strong><?php _e('<a href="'.get_permalink().'">Read More »'); _e('</a>'); ?></strong> <?php endif; ?> <div style="clear:both;"></div> Put the code above in place of the the_content(). In the above, you can modify Read More to something else like Continue Reading, etc. I hope this is what you meant. If you want to have AdSense only after the first post displayed as the_excerpt(), condition it as follows: <?php if((is_home() && $post==$posts[0] && !is_paged()) || is_category() && $post==$posts[0]) { ?> <p> AdSense code </p> <?php } ?> This will put adsense only in the first post when you click on Home and also when you click on a Category. |
|
#3
| |||
| |||
|
In your wp-includes, look for formatting.php. Copy it over to your PC. Open it in Notepad Search for excerpt_length. The default is set for 55. Leave it as it is or change it to another number. That's 55 words and not characters. Again search for array_push($words, '[...]') You can change [...] to something else as long as you keep the array_push intact. Personally, I have kept both as defaults. I guess I was late. You already have the changes made. |
|
#4
| ||||
| ||||
|
Thanks a bunch guys that did it Cheers |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |