我有一个自定义的网格循环,可以在页面上显示特定的帖子类型。
这显示了每个帖子的EXERTP,但它不包含帖子标题,我希望每个帖子都有一个链接到完整帖子的标题。有人能帮忙吗?
谢谢
<?php
/**
* @author Jonathan Perez
*/
/*
Template Name: Grid Loop for Press Releases
*/
// Do the Custom Loop
remove_action(\'genesis_loop\', \'genesis_do_loop\');
add_action( \'genesis_loop\', \'sf_custom_loop\' );
function sf_custom_loop() {
echo \'<h3 class="entry-title media-title">\' . get_the_title() . \'</h3>\';
the_content();
//WP Query Start
$per_page = 9;
$product_args = array(
\'post_type\' => \'pressreleases\',
\'posts_per_page\' => $per_page,
\'paged\' => get_query_var( \'paged\' )
);
$products = genesis_custom_loop( $product_args );
}
//Add Post Class Filter
add_filter(\'post_class\', \'sf_post_class\');
function sf_post_class($classes) {
global $loop_counter;
if ($loop_counter % 3 == 0) {
$classes[] .= \'first \';
}
return $classes;
}
/** Move Post Info */
remove_action(\'genesis_before_post_content\',\'genesis_post_info\');
remove_action(\'genesis_after_post_content\',\'genesis_post_meta\');
genesis();