javascript - removing the block quote and text from a post -
this code removes images wordpress post, , puts images in place
html - snippet
<?php preg_match_all('/(<img [^>]*>)/', get_the_content(), $images); for( $i=0; isset($images[1]) && $i < count($images[1]); $i++ ) { echo $images[1][$i]; } ?> this code removes text post , posts text. want code take out 'block quote' text , regular text seperatly can put block quote on different part of page regular text.
html - snippet
<?php $content = preg_replace('/(<img [^>]*>)/', '', get_the_content()); $content = apply_filters('the_content', $content); echo $content; ?> i have tried including
if(preg_match('~<blockquote>([\s\s]+?)</blockquote>~', $block, $matches)) but can't seem work. want seperate images, block quotes , text each post can putthme in different spots on page
Comments
Post a Comment