Need your help with WP

Well I'm just in a really helpful mood tonight. :)

Warning - these instructions are correct, but I am taking no responsibility. Don't ask me to troubleshoot your code if anything goes wrong. Do a backup before you start and then if anything does go wrong, you can just restore from your backups. This isn't a big deal to do this, but ...
I'm just sayin'.....
ya know what i mean.... ;)


OK kikiriki, here you go:

The Stripey v1.6 theme designer didn't bother making an options tab for the theme. Any changes you want to make have to be done with the theme editor, or using your website file manager or ftp.

To fix this from within WP here is what you need to do. This will only work if you have your stripey theme folder set to 755. Unless you have previously set your stripey theme folder to 755, then all you will be able to do is see the code you need to change.
  • log in to admin
  • go to the Appearance tab
  • click on Editor
    That opens your theme editor
  • The Theme Files are listed on the right
    Select the file you want to edit and make the changes. (I'll tell you which files in a minute)
You can do the same thing by going into your website file manager. This is much better since it's a security vulnerability to have your theme folder set to 755
  • Go into your wp-content folder
  • Go into your themes folder
  • Go into your stripey-v1.6 folder
  • Open index.php with your code editor
  • On line 21 you will find this code (if it isn't on line 21 or your not using a code editor, just search for the_content)
    PHP:
    <?php the_content('Read the rest of this entry »'); ?>
  • Change it to this
    PHP:
    <?php the_excerpt('Read the rest of this entry »'); ?>
Now it won't be showing the full post on the front page anymore.

That is all you need to get it to display excerpts and not the full article on your front page.
------------------------------------

You're done now if you want, the following is just an additional change you can make if you want.

Now, if you want to change the excerpts length, the default is 55. You can use the code given as long as you have wp version 2.9
It is the safest way so try it first, but it doesn't always work.
  • Go into your wp-content folder
  • Go into your themes folder
  • Go into your stripey-v1.6 folder
  • Open functions.php with your code editor
  • Add the code jeffers1957 posted above to the end of the file, right above the last } character. (change the 100 to whatever default length you want)
The filter should work on wp2.7 and newer, but I couldn't get it to work on mine so there might be other factors as well. If changing the excerpt length by adding that filter doesn't work for you, then go back and remove the code you just added. Make sure everything is still workin right and then...

You'll need to change the excerpt length in your core files.
  • Go into your wp-includes folder
  • Open formatting.php with your code editor
  • Search for $excerpt_length (should be around line 1812, or in older versions line 853)
  • Once you find it change the excerpt length in this line to whatever you want it to be.
    PHP:
    $excerpt_length = apply_filters('excerpt_length', 55);

So there you go. I would suggest that before making changes to the files you make a backup copy just in case you make a mistake. It's easier to just replace the file with your backup than to find whatever stray character you accidentally added.

Before you make any changes to your core files it's always a really good idea to make a backup of your database, just in case. Your not changing anything major, but accidents happen. :)

Here are some additional sources
Code:
http://lorelle.wordpress.com/2006/07/19/display-post-excerpts-only-in-wordpress/
http://codex.wordpress.org/Plugin_API/Filter_Reference/excerpt_length
http://itscalledwebdesign.com/tutorials/wp/change-excerpt-length-in-wp/
 
@kikiriki - give us an update. were you able to get your blog working how you wanted?

Hope I was able to help. :beerchug:
 
Back
Top