WordPress.org

Support

Support » Themes and Templates » Inove theme postnavi line overlaps

Inove theme postnavi line overlaps

  • <div id="postnavi">
            <span class="prev"><?php substr(next_post_link('%link'), 0, 40) ?></span>
            <span class="next"><?php substr(previous_post_link('%link'), 0, 40) ?></span>
            <div class="fixed"></div>
    </div>

    In Inove theme, if the title of prev or next blog is too long, the prev and next entries at the bottom of the comment overlap. I tried substr as given above; but didn’t work.
    Any ideas ?

Viewing 1 replies (of 1 total)
  • I’ve not tested this but adding the following to your theme’s functions.php should work:

    function my_trimmed_post_links($format, $link) {
    return substr($link, 0, 40);
    }
    if (function_exists(‘add_filter’)) {
    add_filter(‘next_post_link’, ‘my_trimmed_post_links’, 10, 2);
    add_filter(‘previous_post_link’, ‘my_trimmed_post_links’, 10, 2);
    }

    BTW: your solution doesn’t work because these functions don’t return the value so substr can work on it but just echo it. This way you can’t just feed it to a function but have to use a filter.

Viewing 1 replies (of 1 total)
  • The topic ‘Inove theme postnavi line overlaps’ is closed to new replies.
Skip to toolbar