示例#1
0
<?php while ( have_posts() ) : the_post(); ?>

				<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
					<h3 class="task-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'alfred' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
						
					<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'alfred' ) ); ?>

					<div class="entry-utility">
						<?php alfred_responsibility(); ?> <br />
						<?php printf( '<strong>Status:</strong> %s', alfred_taxonomy( 'task_status', 'name' ) ); ?>
					</div><!-- .entry-utility -->
				</div><!-- #post-## -->
					
<?php endwhile; ?>
示例#2
0
		/**
		 * Create the new meta box for the taxonomy. Uses a select box
		 * as opposed to a text field.
		 *
		 * To override this method, simply redeclare it in the child class. 
		 * 
		 * @since Alfred 0.1
		 * @uses wp_dropdown_categories.
		 */
		function _meta_box() {
			global $post, $alfred;
			
			echo'<div class="input-text-wrap" style="margin:5px 0 0">';

			wp_dropdown_categories( array(
				'taxonomy' => $this->taxonomy,
				'hide_empty' => 0,
				'name' => "alfred[{$this->taxonomy}]",
				'selected' => ( alfred_taxonomy( $this->taxonomy ) ? alfred_taxonomy( $this->taxonomy ) : '' ),
				'show_option_none' => __( '&mdash;', 'alfred' )
			) );
				
			echo'</div>';
		}