CMS Scripts

Add links on your articles before and after

This is a small fragment useful to use if you use the previous and next links in your articles. It will enhance the links showing the name of the actual post, encouraging more people to click on the links.
File to edit: single.php


$p = get_adjacent_post(false, , true);
if(!empty($p)) echo ‘<div class=”prev”><a href=”‘ . get_permalink($p->ID) . ‘” title=”‘ . $p->post_title . ‘”>’ . $p->post_title . ‘</a></div>’;
$n = get_adjacent_post(false, , false);
if(!empty($n)) echo ‘<div class=”next”><a href=”‘ . get_permalink($n->ID) . ‘” title=”‘ . $n->post_title . ‘”>’ . $n->post_title . ‘</a></div>’;

About the author

Hamid Awan

Hamid Awan is a computer Geek, Internet Entrepreneur, Business Guy, Blogger and Digital Marketing Specialist. He also helps companies to grow their Online Business. At Tech Entires he writes about Money Making Ideas, Business, Android Apps, Blogging, WordPress, SEO, Technology and Computer Tips and Tricks. If you have any suggestion, you can contact us through our Contact Us Page

Leave a Comment

1 Comment