I want to put just the first paragraph of my posts on my index.php
in my functions.php I have
<?php
{
global $post;
$output = get_the_content();
$wanted_number_of_paragraph = 1;
$tmp = explode ('</p>', $output);
for ($i = 0; $i < $wanted_number_of_paragraph; ++$i) {
if (isset($tmp[$i]) && $tmp[$i] != '') {
$tmp_to_add[$i] = $tmp[$i];
}
}
$output = implode('</p>', $tmp_to_add) . '</p>';
echo $output;
}
?>
then in my index.php
<?php wpden_excerpt(); ?>
However it posts the entire post (including pictures) and not just the first paragraph.