Responsive Ad Area

Share This Post

test

Limit string on excerpt

I have in WordPress a Post with this excerpt

Name<br />
Surname

and with get_excerpt();?>
show in a page
Name
Surname

I need a modification code for <?php echo $this->get_excerpt();?> to sho the excerpt ONLY before <br />, so <br /> is the character to limit the string.

Like this code that do not work
list($firstWord) = explode('<br />', $string);


Limit string on excerpt
Limit string on excerpt
test
{$excerpt:n}

Share This Post

Leave a Reply

Your email address will not be Publishedd. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>