Support » Theme: Pinboard » Changing Excerpt Length

  • Resolved bgiannak


    Im trying to change the excerpt length shown in the post previews on the homepage.I have change the length to 20 in all in the footer.php in this sector but nothing happened .

    function pinboard_excerpt_length( $length ) {
    if( pinboard_is_teaser() ) {
    if( has_post_format( ‘aside’ ) )
    return 32;
    return 20;
    } else
    return 50;

    is there anything else i could try ?
    thank u !!!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi there.

    I just edited the /wp-content/themes/pinboard/functions.php page, inside that file, I all I did was change the 20 to 100, save and refresh. Your front page should display 100 instead of 20, unless the post is classified as ASIDE.

    oh ignore my last comment, you should really create a CHILD theme first and then edit the functions.php in that theme. The reason for this is if you update your original theme (Pinboard for this exmaple), you will not lose your work.

    It’s actually really easy to make a child theme, you can read up on it here:

    Thank you very much!i will try it as soon as possible.I did not mention it well although…I want to reduse the length of the excerpt because now is about 100+ and i want it to be around 15-20. I guess that i could make it with a Child theme as you mention it before ????

    Well since you already modified the original, I would recommend you reinstall the theme and get the original files back into the /pinboard directory. And then create a new child theme /pinboard-child and modify the functions.php in the child going forward.

    Hopefully you havent made many mods to any of the original files.

    omggime i have created a child theme. In the editor i see only .css and .rtl. I have created a file into the child theme, named it functions.php and then copy the code to change the excerpt length but nothing changed. I want the excerpt to show only the title and the featured image so i changed all the numbers (32-20-50) to 1… but nothing change. Is there anything i misunderstood ? Thank you again for your interest

    link to my site here

    I wanted the excerpt to show only the title and the featured image, no text, so used the following css in the ‘Your custom CSS’ box under the theme options layout section.

    .entry-summary p {

    It was so easy ????? THANK U so much julesjunction ! Everything is OK now….Really helpfull comment.

    Solved 😛

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Changing Excerpt Length’ is closed to new replies.