• Resolved GavinR121

    (@gavinr121)


    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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Theme Author Template Express

    (@danstriker)

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

    Thread Starter GavinR121

    (@gavinr121)

    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;
    }

    Theme Author Template Express

    (@danstriker)

    no that’s the correct bit – change the 150 to increase the excerpt length

    Thread Starter GavinR121

    (@gavinr121)

    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.

    Theme Author Template Express

    (@danstriker)

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

    Hi,

    I have the same problem and i can’t fix it yet . I changed functions.php like this :

    function get_slider_excerpt(){
    $excerpt = get_the_content();
    $excerpt = preg_replace(” (\[.*?\])”,”,$excerpt);
    $excerpt = strip_shortcodes($excerpt);
    $excerpt = strip_tags($excerpt);
    $excerpt = substr($excerpt, 0, 450);
    $excerpt = substr($excerpt, 0, strripos($excerpt, ” “));
    $excerpt = trim(preg_replace( ‘/\s+/’, ‘ ‘, $excerpt));
    return $excerpt;
    }

    and still cuts the text at the 15teen character .. what else can I do to try and fix it , i want the same length as your demo,

    my site in progress:

    http://www.dinamitacostarica.com/natalia/

    i love your theme , thank you ,

    susana

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Slider Text Length’ is closed to new replies.