WordPress.org

Ready to get started?Download WordPress

Forums

Formation
[resolved] Slider Text Length (6 posts)

  1. GavinR121
    Member
    Posted 4 months ago #

    Hi there

    Firstly many thanks for your theme, it looks great and so far very easy to use.

    I just have a small question regarding the text that goes in boxes over the Homepage Slider. I have created a post with the correct Featured category setting and used the featured image too and all works fine. It's just that the text I have put in the main text area (which appears in the black faded box over the image) seems to be cut off after just 12 or 13 words. Is there a way to increase to the word count that displays here like in your demo of the theme?

    My site is work in progress at: http://www.redwing-hosting.com/ianallan/

    Thank you in advance for any advice you can give here.

    Gavin

  2. Ossie Heffell
    Member
    Theme Author

    Posted 4 months ago #

    Hello, in the functions.php file look for slider excerpt length and increase to suit your needs

  3. GavinR121
    Member
    Posted 4 months ago #

    Hi Ossie

    Many thanks for your quick reply.

    Sorry but I can only find the following code relating to in functions.php and don't see this. Should I be looking somewhere else?

    /**
    * Implement excerpt for homepage slider
    */
    function get_slider_excerpt(){
    $excerpt = get_the_content();
    $excerpt = preg_replace(" (\[.*?\])",'',$excerpt);
    $excerpt = strip_shortcodes($excerpt);
    $excerpt = strip_tags($excerpt);
    $excerpt = substr($excerpt, 0, 150);
    $excerpt = substr($excerpt, 0, strripos($excerpt, " "));
    $excerpt = trim(preg_replace( '/\s+/', ' ', $excerpt));
    return $excerpt;
    }

  4. Ossie Heffell
    Member
    Theme Author

    Posted 4 months ago #

    no that's the correct bit - change the 150 to increase the excerpt length

  5. GavinR121
    Member
    Posted 4 months ago #

    Hi again

    That's what I thought I tried that but it didn't do anything. Just me being thick I think as it's working absolutely fine now though!

    Many thanks again your your help much appreciated.

  6. Ossie Heffell
    Member
    Theme Author

    Posted 4 months ago #

    OK good to hear you got it working. Good luck with your website.

Reply

You must log in to post.

About this Theme

About this Topic