Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

2 Answers 2

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.