php - Using wordpress functions to add featured image to block -
hi i'm bit new adding custom functions in code i'm building blog , in every post page has button says previous or next article. wanted use pre existing function display block featured image each previous/next post.
i'm using radcliffe theme , arrows in bottom of page. part of code want add "block":
thank you!
<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; ?>
Comments
Post a Comment