WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm customizing a theme for a client and I want to leverage post formats.

On the quote post format I would like


to be wrapped in a two spans that contains quotation marks that I could style and position. Is this possible?


share|improve this question
up vote 1 down vote accepted


$content = get_the_content();
$content = '<span>"</span>'.$content.'<span>"</span>';

echo apply_filters('the_content', $content);

CSS Solution:

    <?php the_content(); ?>

   content: '"';

   content: '"';
share|improve this answer

Similar to @sisir but a slightly different take on a few of the specifics. For functions.php:

add_action( 'the_content', 'add_quotes_to_quote' );
function add_quotes_to_quote( $content ) {
    if( get_post_format() == "quote" ) {
        return '<span class="openquote">"</span>' . $content . '<span class="closequote">"</span>';

If you're using post_class() and don't need perfect browser support, you can use CSS something like this (.entry-content being some wrapping element around your body content):

.format-quote .entry-content:before,.format-quote .entry-content:after {
    /* your styles */
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.