3,
'post_status' => 'publish'
));
function delete_all_between($beginning, $end, $string) {
$beginningPos = strpos($string, $beginning);
$endPos = strpos($string, $end);
if ($beginningPos === false || $endPos === false) {
return $string;
}
$textToDelete = substr($string, $beginningPos, ($endPos + strlen($end)) - $beginningPos);
return str_replace($textToDelete, '', $string);
}
?>
have_posts() ) : ?>
have_posts() ) : $the_query->the_post();
if(get_post_status() == 'publish'){ ?>
20){
$excerpt = substr($excerpt, 0, $pos[20]) . '...';
}
echo $excerpt;
?>