New Year Sale | Flat 20% OFF on Lifetime & All Themes Package. Use coupon code WLC2025 Buy Now

WordPress Website Templates

Find Professional WordPress themes Easy and Simple to Setup

inner banner

Slider blank lines and to short text

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1068
    Iztok Jamnik
    Participant

    Hi,

    I’ve installed a free version of your theme.

    1. I’ve problem that before and after the text in a slider there is an empty line (empty p tag).

    You can see it on http://www.zasluzim.si/.

    2. On your demo page you have bold text in a first row in a slider. How can I do that?

    3. The text in the second row (the content of the page) of a slider in my theme can be very short – see first slide on my page – this is the max number of characters that can be shown. How can I show more characters?

    Thank you in advance

    Iztok

    #1117
    Grace Themes
    Member

    Hi Iztok,

    Please send WordPress admin login details of your website at [email protected]
    so we can check your site and solve the problems.

    Regards
    Grace Themes

    #4478

    I have exactly the same problems, could you solve it?

    #4481
    Grace Themes
    Member

    Hi Andreas,

    To remove the empty line before and after the slider description

    Go to Appearance -> Editor -> header.php file

    at line no. 69 you will find the below code

    <p><?php echo wp_trim_words( get_the_content(), 20, '' ); ?></p>

    just need to remove p tag like below

    <?php echo wp_trim_words( get_the_content(), 20, '' ); ?>

    Also to make the homepage slider auto rotate

    Open js/jquery.nivo.slider.js file
    at line no. 22 set stop: false

    Please do this changes and let me know your feedback.

    If you find any difficulty please send WordPress admin login details of your website at [email protected] so we can check your site and solve the problems.

    Regards
    Grace Themes
    https://gracethemes.com

    #4789

    Hi,

    I don’t have the code that you mention, for me the line looks like this:

    $content = apply_filters(‘the_content’, substr(strip_tags($post->post_content), 0, 100));

    which explains, why the line is truncated after exactly 100 characters.

    Why aren’t you using https://codex.wordpress.org/Function_Reference/get_the_excerpt?

    #4792
    Grace Themes
    Member

    Hi

    The slider in your website http://youlius-award.de/ is working fine and the empty line is not displaying.

    Please check.

    Regards
    Grace Themes

    #4803

    Yeah, I fixed it myself in the meantime, thanks for pointing me to the correct location.

    My header.php now uses this to display the first paragraph, max 200 characters, truncated at a word.

    $title = get_the_title( $id );
    $post = get_post($id);
    $content_long = apply_filters(‘the_content’, substr(strip_tags($post->post_content), 0, 400));
    $content = strtok(wordwrap($content_long, 200, “…\n”), “\n”);

    #4806
    Grace Themes
    Member

    That’s Great.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.