Navigation d & rsquo; in Article WorPress 2 buttons

 

Article Navigation in WorPress 2 buttons.
Edit WordPress for better navigation between your articles.

A first example below desous to separate our WordPress Form navigation menu.
Editing performed on single.php or template-single.php (depending on the themes chosen this differs configuration).

<div align="left" class="boutonleft"><?php previous_post_link( '%link', '&larr; %title'); ?></div>
<div align="right" class="boutonright"><?php next_post_link( '%link', '%title &rarr;'); ?></div>

 

And now see how to integrate a special character (HTML entity) in our WordPress articles navigation menu.
previous Article:

<?php $prevPost = get_previous_post(false);
if($prevPost) {
$args = array(
'posts_per_page' => 1,
'include' => $prevPost->ID
);echo "\t" . '<a rel="prev" href="' . get_permalink($prev_post->ID) . '" title="' . $prev_title. '" class="previous-post"><h4><span class="icone">&larr;</span>PREVIOUS POST</h4></a>' . "\n";
$prevPost = get_posts($args);
foreach ($prevPost as $post) {
setup_postdata($post);
?>
<?php
wp_reset_postdata();
} //end foreach
} // end if
?>

 

 

next article:

<?php $nextPost = get_next_post(false);
if($nextPost) {
$args = array(
'posts_per_page' => 1,
'include' => $nextPost->ID
);echo "\t" . '<a rel="next" href="' . get_permalink($next_post->ID) . '" title="' . $next_title. '" class="next-post"><h4>NEXT POST<span class="icone">&rarr;</span></h4></a>' . "\n";
$nextPost = get_posts($args);
foreach ($nextPost as $post) {
setup_postdata($post);
?>
<?php
wp_reset_postdata();
} //end foreach
} // end if
?>


[site_reviews_summary assigned_to=”post_id”]

Cancel
[site_reviews_form assign_to=”post_id”]
Rate this article

[site_reviews display=10 assigned_to=”post_id”]

Leave a Reply

Your email address will not be published. Required fields are marked *