Blog Excerpt

Discussion in 'BusinessGrow One Page WordPress Theme' started by renarts, Aug 6, 2014.

  1. renarts

    renarts Member

    Joined:
    Sep 4, 2013
    Messages:
    49
    Likes Received:
    1
    Hi there.

    Is there a way that we can have the excerpt restricted to a specific number of lines including the Title? I noticed that the buttons are not aligned if the title is longer than the others.

    Hope you can help me with this. Thanks in advance.
     
  2. Krish

    Krish Support Staff

    Joined:
    Oct 22, 2012
    Messages:
    210
    Likes Received:
    1
    Location:
    India
  3. renarts

    renarts Member

    Joined:
    Sep 4, 2013
    Messages:
    49
    Likes Received:
    1
    Hi Krish,

    Appreciate your help but it didn't work. I added the line but all it did is upper at the upper portion of my header as a text. kindly check attached image.

    I also couldn't find the function.php file anymore on my WP Theme editor.

    Hope for a fast response to this issue. Thanks.
     

    Attached Files:

  4. renarts

    renarts Member

    Joined:
    Sep 4, 2013
    Messages:
    49
    Likes Received:
    1
    Hi Krish.

    I figured it out by googling.

    I had a hard time figuring how to change the excerpt link as you only provided the code when you could have told me to change 20 to the number of characters I want to have. I do hope that when you provide assistance please know that some of those who ask are may not be familiar with how to customise codes.

    I also would like to ask if there is a away to limit the lines or character of the title on these excerpts. What I want to happen is that all the READ MORE links are aligned together. Hope you can assist me with this.

    Thanks.
     
  5. Pramod

    Pramod Guest

    Joined:
    Aug 8, 2014
    Messages:
    2,847
    Likes Received:
    63
    Hello,

    Please goto
    (Appearance -> Editor -> function.php)
    paste above code at the end of file and update file


    Thanks & Regards
    Pramod Patel
     

    Attached Files:

  6. renarts

    renarts Member

    Joined:
    Sep 4, 2013
    Messages:
    49
    Likes Received:
    1
    Hi Pramod,

    I was able to successfully insert the code already yesterday. What I need though is whether we can limit the lines or characters instead of words and do it not only on the content but the title of the post as well. Kindly check my last message.

    Looking forward to your assistance. Thanks in advance.
     
  7. PankajK

    PankajK Support Staff

    Joined:
    Aug 8, 2014
    Messages:
    93
    Likes Received:
    5
    Hi renarts
    Unfortunately there is no way to limit the excerpt by line. But you can use some trick.

    1. The first thing you need to do is to add this code to your functions.php file
    PHP:
    function custom_excerpt_length$length ) {
            return 
    20;
        }
        
    add_filter'excerpt_length''custom_excerpt_length'999 );
    2. Now if you still find a post which has more lines, then edit your post and make you excerpt even shorter with "Insert Read More Tag Button".
     

    Attached Files:

Share This Page