Php 使用wordpress函数将特色图像添加到块
嗨,我对在代码中添加自定义函数有点陌生,但我正在创建一个博客,在每篇文章页面上都有一个按钮,上面写着上一篇或下一篇文章。我想使用这个预先存在的功能,但是为每个上一篇/下一篇文章显示一个带有特色图像的块 我正在使用,箭头在页面底部。这是我想添加“块”的代码部分: 谢谢大家!Php 使用wordpress函数将特色图像添加到块,php,wordpress,custom-post-type,Php,Wordpress,Custom Post Type,嗨,我对在代码中添加自定义函数有点陌生,但我正在创建一个博客,在每篇文章页面上都有一个按钮,上面写着上一篇或下一篇文章。我想使用这个预先存在的功能,但是为每个上一篇/下一篇文章显示一个带有特色图像的块 我正在使用,箭头在页面底部。这是我想添加“块”的代码部分: 谢谢大家! <div class="post-nav"> <?php $next_post = get_next_post(); if (!empty( $next_post )): ?> <p
<div class="post-nav">
<?php
$next_post = get_next_post();
if (!empty( $next_post )): ?>
<p class="post-nav-next">
<a title="<?php _e('Next post:', 'radcliffe'); echo ' ' . get_the_title($next_post); ?>" href="<?php echo get_permalink( $next_post->ID ); ?>"><?php echo get_the_title($next_post); ?> </a>
</p>
<?php endif; ?>
<?php
$prev_post = get_previous_post();
if (!empty( $prev_post )): ?>
<p class="post-nav-prev">
<a title="<?php _e('Previous post:', 'radcliffe'); echo ' ' . get_the_title($prev_post); ?>" href="<?php echo get_permalink( $prev_post->ID ); ?>"><?php echo get_the_title($prev_post); ?> </a>
</p>
<?php endif; ?>
请添加一个特定的问题陈述——“它不工作”可以假设,但它如何不工作?什么错误信息或错误行为是特征?没有错误,我只是想添加一些东西