Support » Fixing WordPress » Customise post intro

  • Hi
    The default is to pull in the first 55 characters of a post
    Can a custom intro be created so that the intro and the first 55 characters of the full post are different?
    Thanks
    Earl

Viewing 8 replies - 1 through 8 (of 8 total)
  • I hope you need custom excerpt function

    function excerpt( $num=50 )
    {
    	$limit = $num+1;
    	$excerpt = explode(' ', get_the_excerpt(), $limit);
    	array_pop($excerpt);
    	$excerpt = implode(" ",$excerpt);
    	echo $excerpt;
    }

    Try this

    Thanks for the quick response, however I am not a developer
    can you be more specific, wher is that code added?

    Add this code on your theme folder/function.php
    (Or create child theme)

    Replace the_excerpt() to echo excerpt( NUMBER_OF_WORDS ) on your archive or index what ever you want

    So on our website here http://www.themediaonline.co.za
    The intros on the home page posts would be different to the intro of the full post when you click on read more?

    Its working fine

    Intro
    “Global researchers Millward Brown have released the 2015 AdReaction study, this time looking at the subject of Video Creative in a Digital World. Questions posed to consumers included how vi…”

    Full Post
    “Global researchers Millward Brown have released the 2015 AdReaction study, this time looking at the subject of Video Creative in a Digital World. Questions posed to consumers included how videos are viewed by screen and for how long; what people think of video ads by screen, and how to create ads consumers won’t skip.
    ..
    ..
    ..”

    Am not sure what you need!!

    Hi
    We want to know if the intro can be different to the first 55 characters of the full post. So, when setting up a new post, we would have some sort of box where we can type in a custom intro, I dont even know if this is possible in WordPress!!!!
    Thanks
    Earl

    Hi
    What we did is make the first para of the post white text, so you see it in the home page intro, but not in the full post. However, for some reason it shows a double image, any idea why?
    Thanks
    E

    http://rodoyo.com/goodnews/2015/07/30/lisa-macleod-leaves-media24-for-times-media-group/

    White text set by inline. Can you check your text editor on admin panel

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Customise post intro’ is closed to new replies.