不得不把一些东西混在一起,但这是我的结果:
这对于更多想要用强大的下一个/上一个系统创建投资组合的人来说非常方便。
谢谢大家的帮助!
<?php
$current_post = $post; // keep a copy of the current post;
$post = get_previous_post(false);
$attr = array(
\'title\' => $post->post_title,
\'alt\' => $post->post_title,
\'class\' => \'meta_icon\'
);
echo "<a href=\'".$post->guid."\'>";
echo "<div class=\'meta_apps\'>";
echo "<div class=\\"meta-icon\\">".get_the_post_thumbnail($post->post_id, \'thumbnail\', $attr)."</div>";
echo "<div class=\\"meta-title\\">".$post->post_title."</div>";
echo "</div>";
echo "</a>";
$post = get_previous_post(false);
$attr = array(
\'title\' => $post->post_title,
\'alt\' => $post->post_title,
\'class\' => \'meta_icon\'
);
echo "<a href=\'".$post->guid."\'>";
echo "<div class=\'meta_apps\'>";
echo "<div class=\\"meta-icon\\">".get_the_post_thumbnail($post->post_id, \'thumbnail\', $attr)."</div>";
echo "<div class=\\"meta-title\\">".$post->post_title."</div>";
echo "</div>";
echo "</a>";
$post = get_previous_post(false);
$attr = array(
\'title\' => $post->post_title,
\'alt\' => $post->post_title,
\'class\' => \'meta_icon\'
);
echo "<a href=\'".$post->guid."\'>";
echo "<div class=\'meta_apps\'>";
echo "<div class=\\"meta-icon\\">".get_the_post_thumbnail($post->post_id, \'thumbnail\', $attr)."</div>";
echo "<div class=\\"meta-title\\">".$post->post_title."</div>";
echo "</div>";
echo "</a>";
$post = $current_post;
$post = get_next_post(false);
$attr = array(
\'title\' => $post->post_title,
\'alt\' => $post->post_title,
\'class\' => \'meta_icon\'
);
echo "<a href=\'".$post->guid."\'>";
echo "<div class=\'meta_apps\'>";
echo "<div class=\\"meta-icon\\">".get_the_post_thumbnail($post->post_id, \'thumbnail\', $attr)."</div>";
echo "<div class=\\"meta-title\\">".$post->post_title."</div>";
echo "</div>";
echo "</a>";
$post = get_next_post(false);
$attr = array(
\'title\' => $post->post_title,
\'alt\' => $post->post_title,
\'class\' => \'meta_icon\'
);
echo "<a href=\'".$post->guid."\'>";
echo "<div class=\'meta_apps\'>";
echo "<div class=\\"meta-icon\\">".get_the_post_thumbnail($post->post_id, \'thumbnail\', $attr)."</div>";
echo "<div class=\\"meta-title\\">".$post->post_title."</div>";
echo "</div>";
echo "</a>";
// $post = get_next_post(false);
// echo $post->post_title;
// $post = get_next_post(false);
// echo $post->post_title;
get_post_thumbnail();
next_post_link();
previous_post_link();
?>