Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Busca o primeiro blockquote do post para o formato QUOTE. Se não houver, mostra o post
- // Colar no functions.php
- function temabase_quote_content() {
- global $post, $posts;
- $blockquote = '';
- ob_start();
- ob_end_clean();
- $output = preg_match_all('/<blockquote>(.*?)<\/blockquote>/s', $post->post_content, $matches);
- if (empty($matches [0]))
- return the_content('(Continue lendo)');
- $blockquote = $matches [0] [0];
- return '<div class="entry-quote">' . $blockquote . '</div>';
- }
- // Colar no content-quote.php substituindo o the_content() ou the_excerpt() - menos nos singles
- echo temabase_quote_content();
Advertisement
Add Comment
Please, Sign In to add comment