0

First of all, I have a client that has no HTML knowledge. He wants his all his posts to have a certain format where within the post body, he can add multiple pull quotes with different styles. Note that all the posts would have the same structure. Any suggestions on how to go about this? Custom post style? Custom button on TinyMCE?

Anyhelp would be appreciated

0

you can create shortcode for that

1.make a shortcode unsing add_shortcode(functions.php)

add_shortcode('bquote','ravs_blockquotes_func')    
    function ravs_blockquotes_func( $atts, $content="" ) {
             extract( shortcode_atts( array(
                  'style' => 'style1'
             ), $atts ) );
        return '<blockquote class="'.$style.'">'.$content.'</blockquote>' 
        }

2.now just simply define quote in shortcode(post or page editer)

[bquote style="style2"]your quote[/bquote]

it's output in html like

<blockquote class="style2">your quote</blockquote>

3.create as many as class for blockquote style you want.it's easy to use and understand.

Important Link:

WordPress Shortcode API

WordPress shortcode complete guide

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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