示例#1
0
			<div class="sectioncontainer">
            	<div class="sectionheader" id="blog">
                	<div class="sectioncontent">
                    <?php 
        the_title('<h2>', '</h2>');
        ?>
                    <p>Posted By <a href="<?php 
        echo get_author_posts_url(get_the_author_meta('ID'));
        ?>
"><?php 
        echo get_the_author();
        ?>
</a></p>
                    <div class="postdate">
                       	<?php 
        Rotary_posted_on();
        ?>
                       </div>
                     <hr/>  
 
                       <div class="blogcontent">
                    	
                        	
							<?php 
        the_content();
        ?>
                            
                        </div>
                        <?php 
        Rotary_posted_in();
        ?>
示例#2
0
function rotary_output_blogroll($postCount, $clearLeft)
{
    $postCount++;
    if ($postCount % 2 == 0) {
        $clearLeft = '';
    } else {
        $clearLeft = 'clearleft';
    }
    ?>

     
        <article id="post-<?php 
    the_ID();
    ?>
" <?php 
    post_class($clearLeft);
    ?>
>
         	<div class="sectioncontainer">
            	<div class="sectionheader blogroll" id="blog-<?php 
    the_ID();
    ?>
" >
                	<div class="sectioncontent">
			<header>
			    <?php 
    $title = get_the_title();
    ?>
			    <?php 
    if (strlen($title) > 30) {
        $title = substr($title, 0, 30) . '...';
    }
    ?>
                <h2><a href="<?php 
    the_permalink();
    ?>
" title="<?php 
    printf(esc_attr__('Permalink to %s', 'Rotary'), the_title_attribute('echo=0'));
    ?>
" rel="bookmark"><?php 
    echo $title;
    ?>
</a></h2>
                               <div class="postdate">
                	<span class="alignleft">Posted by <a href="<?php 
    echo get_author_posts_url(get_the_author_meta('ID'));
    ?>
"><?php 
    echo get_the_author();
    ?>
</a></span>
                    <span class="alignright"><?php 
    Rotary_posted_on();
    ?>
</span>	
                </div>    
            </header>
 
   
                <?php 
    $thumb = has_post_thumbnail();
    ?>
                <?php 
    if ($thumb) {
        // check if the post has a Post Thumbnail assigned to it.
        $attr = array('class' => 'alignleft');
        ?>

  						<a href="<?php 
        the_permalink();
        ?>
 "><?php 
        the_post_thumbnail('post-thumbnail', $attr);
        ?>
</a>
					<?php 
    }
    ?>
   
                <?php 
    if ($thumb) {
        ?>
 
               		<section class="excerptcontainer"> 
               <?php 
    }
    ?>
 
             <?php 
    if ('rotary_speakers' == get_post_type()) {
        //program notes are filled in after a speakers visit. If the speaker has not yet been to the club, we show the upcoming content
        $programNotes = trim(get_field('speaker_program_notes'));
        if ('' == $programNotes) {
            $programNotes = trim(get_field('speaker_program_content'));
        }
        $programNotes = preg_replace('/<img[^>]+./', '', $programNotes);
        $programNotes = strip_tags($programNotes);
        if (strlen($programNotes) > 200) {
            $programNotes = substr($programNotes, 0, 200);
        }
        ?>
             
					<p><?php 
        echo $programNotes;
        ?>
 <a href="<?php 
        the_permalink();
        ?>
">[…]</a></p>					 
             <?php 
    } else {
        the_excerpt();
    }
    ?>

              <?php 
    if ($thumb) {
        ?>
 
                </section>
              <?php 
    }
    ?>
    
              
  
            <footer class="meta">
            <p>
                <?php 
    edit_post_link(__('Edit', 'Rotary'), '', ' ');
    ?>
                <?php 
    comments_popup_link(__('Leave a comment', 'Rotary'), __('1 Comment', 'Rotary'), __('% Comments', 'Rotary'), 'commentspopup');
    ?>
</p>
                <?php 
    if (count(get_the_category())) {
        ?>
                        <p><?php 
        printf(__('Posted in %2$s', 'Rotary'), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list(', '));
        ?>
</p>
                <?php 
    }
    ?>
                <?php 
    $tags_list = get_the_tag_list('', ', ');
    if ($tags_list) {
        ?>
                        <p><?php 
        printf(__('Tagged %2$s', 'Rotary'), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list);
        ?>
</p>
                <?php 
    }
    ?>
                
                
                 
            </footer>
               				</div><!--.sectioncontent-->
                </div> <!--.sectionheader-->
			</div><!--.sectioncontainer-->
		</article>
       <?php 
    return $postCount;
    ?>
	
<?php 
}