使用类别。创建一个名为Person或Team的新类别或其他类似的功能。然后将帖子标题用于名称 - 可以在帖子中添加任何其他信息,然后将图像添加到精选图片。
通过复制另一个模板文件并为其指定一个标题来为此页创建一个新模板。
<?
/*
Template Name: About Us/Team/Whatever
*/
?>
,并在页面只调用的信息,你想是这样的:
//Set up the Loop
<?php
global $post;
$args = array (
'category' => 4,
'order' => 'ASC');
$teamposts = get_posts($args);
foreach($teamposts as $post) : setup_postdata($post); ?>
//Call the information you want - put them in <li> if you need
<?php the_title();?>
<?php the_excerpt();?> //OR the_content
<?php the_post_thumbnail('new-image-size');?>
//Close the loop
<?php endforeach; ?>
然后,您可以继续拨打其他任何你想要或在同一页上运行另一个循环调用其他信息。
为了得到正确大小的缩略图,您称之为“新图像大小” - 要设置它,请在您的functions.php文件中添加一行。
// Post Thumbnails
add_theme_support('post-thumbnails');
// name of the thumbnail, width, height, crop mode
add_image_size('front-page-services', 450, 270, true);
如果这不是一个编码问题,它可能应该在Wordpress Stack Exchange上,而不是http://wordpress.stackexchange.com/。 – 2012-07-30 23:07:06
这个问题似乎是无关紧要的,因为它涉及到使用Wordpress。 – KatieK 2013-06-28 17:54:21