{1 - 24} GreyGrey
{25 - 49} GreenGreen
{50 - 499} BlueBlue
{500 - 4999} OrangeOrange
{5000 - 24999} RedRed
{25000+} BlackBlack

Please confirm that you would like to report this for an admin to review.


Change excerpt length

Can the excerpt length for the post be changed on the home page? Would like to shorten it some.



Confirm that you would like to Remove Email Alerts for your question. You cant undo this and you will not be able to re-subscribe.


2 Answers

Create child theme first for omg then on your child theme functions.php file, add this code,

function omg_custom_excerpt_length( $length ) {

  return 20;

}

add_filter( 'excerpt_length', 'omg_custom_excerpt_length', 999 );


Note: you can change the value 20.

Confirm that you would like to select this answer as the "Best Answer" to your question. This will bring this answer to to top and be highlighted as "Best Answer". You can always change this if a better answer is given.


Kris,
Thanks for the answer. I will have to look into child themes. Never messed with them before.

Confirm that you would like to select this answer as the "Best Answer" to your question. This will bring this answer to to top and be highlighted as "Best Answer". You can always change this if a better answer is given.


You must be Logged In to Answer this Question

Already a Member, Log In
Not a member yet? Sign Up