0
我想显示在网格视图定义文章类型(CPT)相似,在这个网站:显示自定义文章类型电网的WordPress
我已经彻底搜查谷歌和#2无济于事。它需要有一个缩略图,就像上面链接的网站一样,点击后直到特定页面。基本上它是一个展示案例工作的投资组合。
目前我有一个名为'Portfolio'的自定义帖子类型,并且已经创建了一个非常基本的模板以使用以下代码显示这些模板;
<?php
/**
* Template Name: Recipes Page
*
* Selectable from a dropdown menu on the edit page screen.
*/
get_header(); ?>
<div id="primary">
<div id="content" role="main">
<?php query_posts('post_type=portfolio'); ?>
<?php while (have_posts()) : the_post(); ?>
<?php get_template_part('content', 'page'); ?>
<?php comments_template('', true); ?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content -->
</div><!-- #primary -->
<?php get_footer(); ?>
我不是一个php编码器,并且对php编码知之甚少,任何帮助都将不胜感激。
谢谢