How to display quote format by preg_match function?
I have defined quote
post format for the theme:
// Add post-formats for theme
add_theme_support( 'post-formats', array(
'quote',
) );
After it, I want to display quote from the content. For that, I want to use preg_match_all
function to search for blockquoteHello World./blockquote
if( $format == 'quote' ) {
$content = apply_filters( 'the_content', get_the_content() );
preg_match( '/blockquote.*?/', $content, $matches );
}
But it is not working. I want to find blockquote tag and display content inside this tag.
Topic post-formats Wordpress
Category Web