Home Forums Teddy WordPress Theme How to add quote format

This topic contains 0 replies, has 1 voice, and was last updated by  BWSM 4 years, 1 month ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #265

    BWSM
    Keymaster

    Hi

    1. Change functions.php, add the code after line 154:
    }elseif(has_post_format(‘quote’)){
    get_template_part(‘mod’,’quote’);

    Screenshot: http://d.pr/i/1EcO

    2. Change admin/index.php line 136 as:
    add_theme_support( ‘post-formats’, array( ‘gallery’, ‘audio’, ‘video’,’quote’ ) );

    3. Create a new php file, paste the code:

    <section class="list_item container <?php if($teddy_color){ echo 'block_bg_'.$teddy_color; }?>">
    				<div class="listitem_info fulltext">
    					
    					<div class="listitem_info_wrap">
    						<h3 class="post-title" style="text-align:center"><?php the_title();?></h3>
    						<div class="listitem_des" style="text-align:center; font-style:italic"><?php the_excerpt();?></div>
    						
    					</div>
    				</div><!--End .listitem_info-->	
    			</section>

    Name it as mod-quote.php and put it in teddy folder.

    4. You could add a new post, select quote format. You could enter the quote content in post title box, enater the name in Excerpt box

    Good luck!

    • This topic was modified 4 years, 1 month ago by  BWSM.
    • This topic was modified 4 years, 1 month ago by  BWSM.
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.