当用户从下拉列表中选择特定类别时,将显示多个帖子类型的列表。我想用标题中的帖子类型标题分组显示数据。
我不确定如何划分为岗位类型组。我花了一点时间寻找,但没有找到我真正需要的东西。
我还试图添加<?php $post_type = get_post_type( $post->ID ); echo $post_type; ?>
但这只是重复(显然)。
调用循环
<div id="content" role="main" style="float:right; width:765px;">
<?php
$category_description = category_description();
if ( ! empty( $category_description ) )
echo \'<div class="archive-meta">\' . $category_description . \'</div>\';
get_template_part( \'loop\', \'support\' );
?>
</div>
回路
<?php else : ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2 class="entry-title" style="margin-bottom:3px;"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( \'Permalink to %s\', \'twentyten\' ), the_title_attribute( \'echo=0\' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<span>type = <?php $post_type = get_post_type( $post->ID ); echo $post_type; ?> <?php echo get_post_meta($post->ID, "document-type", true); ?> <?php echo get_post_meta($post->ID, "software-type", true); ?></span>
<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
<?php the_excerpt(); ?>
<span class="%1$s">Compatible with:</span><br />
<?php if ( count( get_the_category() ) ) : ?>
<?php printf( __( \'%2$s\', \'twentyten\' ), \'entry-utility-prep entry-utility-prep-cat-links\', get_the_category_list( \', \' ) ); ?>
<?php endif; ?>
<?php else : ?>
<?php endif; ?>
<div class="entry-utility">
<?php
$tags_list = get_the_tag_list( \'\', \', \' );
if ( $tags_list ):
?>
<span class="tag-links">
<?php printf( __( \'<span class="%1$s">Tagged</span> %2$s\', \'twentyten\' ), \'entry-utility-prep entry-utility-prep-tag-links\', $tags_list ); ?>
</span>
<?php endif; ?>
</div>
</div>