Problem with truncate link text
-
Im trying to truncate the link text.
function.php
function entry_header_title( $link = true, $before = '', $after = '', $echo = true, $length = false ) { $title = get_the_title(); if ( $length && is_numeric($length) ) { $title = substr( $title, 0, $length ); } if ( strlen($title)> 0 ) { $title = apply_filters('entry_header_title', $before . $title . $after, $before, $after); if ( true == $link ) $title = '<a href="' . get_permalink() . '" title="Read Post ' . get_the_title() . '">' . get_the_title() . '</a>'; echo $title; } }postpage
<h2 class="entry-title"><?php entry_header_title( true, '', '...', true, '45' ); ?></h2>I have gotten the nonlink to truncate but i have no idea how to truncate the link text
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Problem with truncate link text’ is closed to new replies.