Excerp problems (2 posts)

  1. nzk
    Posted 9 years ago #

    I am making a digg this link, i got the url and title part working, but how do i make the description part work?

    its like >http://digg.com/submit?phase=2&url=<?php the_permalink();?>&title=<?php the_title();?>&description<?php the_excerpt();?>

    But the_except() outputs the html code for the excerpt. So how do I do it?

  2. Kafkaesqui

    Posted 9 years ago #

    You can try:

    <?php echo strip_tags(get_the_excerpt()); ?>

    This should strip out all HTML content. Note we're using get_the_excerpt() to return (but not display) your excerpt text, which is why we need to echo it here.

    Considering what you're doing, you may want to check out the PHP function urlencode()...

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.