Code Directory
 Visual Basic & VB.NET
New Code
Vue Injector 3.3
Spectrum Analyzer pro Live 2019
Devart Excel Add-in for HubSpot 2.1
RentALLScript - Airbnb clone 2.2
SuiteCRM Theme Customization 7.11.6
iScripts NetMenus 3.1
iScripts EasyIndex 2.2
iScripts EasySnaps 2.0
Australia MyPost shipping For Magento 2 1.0.0
Australia Post eParcel For Magento 1.1.1
Source Control for SQL Server 2.0
Answers phpSoftPro 3.12
Exlcart 2.0
School College ERP 1.3.2
White-label Grocery Delivery App Solution 2.0
Top Code
IcrediBB Bulletin Board System 1.0
iScripts EasySnaps 1
iScripts EasyIndex 1
iScripts NetMenus 2.0
Vue Injector 3.3
OpenGl 3D Effect 1.1
Linklok URL
Password Generator Software 2.3
Put your app in the System Tray 1.1
CardCheck COM DLL for Credit Card Processing 1.1
GnuWin64 64
Custom Order Form2 1
WEditor 1.0
Answers phpSoftPro 3.12
T-Shirt Designer Software 4.0
Top Rated
Answers phpSoftPro 3.12
phpEnter 5.1.
Quick Maps For Dynamics CRM 3.1
Single Leg MLM 1.2.1
Azizi search engine script PHP 4.1.10
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
Deals and Discounts Website Script 1.0.2
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
Ambrosite Next/Previous Post Link Plus 2.3
File ID: 92433

Ambrosite Next/Previous Post Link Plus 2.3
Download Ambrosite Next/Previous Post Link Plus 2.3http://wordpress.orgReport Error Link
License: Freeware
File Size: 10.0 KB
Downloads: 11
Submit Rating:
Ambrosite Next/Previous Post Link Plus 2.3 Description
Description: This plugin creates two new template tags (next_post_link_plus and previous_post_link_plus) which are upgraded versions of the core WordPress next/previous post link template tags. The new tags include all of the functionality of the core tags, plus the following additional options:

* Sort the next/previous post links on columns other than post_date (e.g. alphabetically).
* Loop around to the first post if there is no next post (and vice versa).
* Truncate the link titles to any length, and display the full titles in the tooltip.
* Display post thumbnails alongside the links (WordPress 2.9 or higher).
* Return false if no next/previous post is found, so themes may conditionally display alternate text.

The new template tags accept the following arguments. The $order_by, $loop, $thumb, and $max_length parameters are new; the others work exactly the same as described in the WordPress Codex.

<?php next_post_link_plus($order_by, $loop, $thumb, $format, $link, $max_length, $in_same_cat = false, $excluded_categories = ''); ?>

The $order_by Parameter

If you are using either the query_posts function, or a plugin like postMash or Query Posts Widget to display your posts in alphabetical order (or in any order besides reverse chronological), then you will want your next/previous post links to cycle through the posts in the same order. The $order_by parameter may be used to sort the next/previous post links on any of the following columns:

post_date, post_title, post_excerpt, post_name, post_modified, ID, post_author, post_parent, menu_order, comment_count

For example, to move through the posts in alphabetical order:

<?php next_post_link_plus('post_name'); ?>

The $loop Parameter

If the $loop parameter is set to 'loop', then the next post link will loop around to the first post if there is no next post (and vice versa). The default is 'no loop'. For example, if I want the next post link to lead back to "Alligator" once I get to "Zebra":

<?php next_post_link_plus('post_name', 'loop'); ?>

The $thumb Parameter

The plugin has built-in support for the post thumbnail feature that was introduced in WordPress 2.9. If you want to display the post thumbnails alongside the next/previous links, set $thumb to 'thumb'. The default is 'no thumb'.

<?php next_post_link_plus('post_date', 'no loop', 'thumb'); ?>

The thumbnail and link are given CSS classes named 'post-thumbnail' and 'post-link' to add in styling. By default, they appear next to each other, however if you want the link to appear underneath the thumbnail, add the following styles to your CSS file:

.post-thumbnail { float: left; }
.post-link { float: left; clear: left; }

The $max_length Parameter

Truncates the post titles to the nearest whole word under the length you specify, while adding three dots at the end to signify that the title was trimmed. Default is zero (do not truncate). For example:

<?php next_post_link_plus('post_date', 'no loop', 'no thumb', '%link dlT¬', '%title', 25); ?>

This will trim "The New York Giants Win Super Bowl XLII in Overtime" to "The New York Giants Win..." The full title will be displayed in the tooltip when the mouse hovers over the link.

The Return Value

This makes it much easier to create alternate styles in the event that no next/previous post is found. For example, to create grayed out inactive links, you can simply test the return value as follows:

<?php if ( !previous_post_link_plus('post_date', 'no loop', 'no thumb', '%link', 'dlTz Previous') ) {
echo '<span class="inactive">dlTz Previous</span>'; // if there are no older articles
} ?>

Note that if the $loop parameter is set to 'loop', the function will never return false, since an adjacent post will always be found.

Complete Example The following pair of template tags cycle through all posts in alphabetical order, within the same category, with looping, but no post thumbnails, using the default link title and format, and truncating the title to the nearest whole word under 30 characters:

<?php previous_post_link_plus('post_name', 'loop', 'no thumb', 'dlTz %link', '%title', 30, TRUE); ?> | <?php next_post_link_plus('post_name', 'loop', 'no thumb', '%link dlT¬', '%title', 30, TRUE); ?>

Installation :

* Upload ambrosite-post-link-plus.php to the /wp-content/plugins/ directory.
* Activate the plugin through the Plugins menu in WordPress.
* Edit your single.php file (plus any other single post template files you may have created), and replace the next_post_link and previous_post_link template tags with next_post_link_plus and previous_post_link_plus. Configure them using parameters as explained above.

License: Freeware

Related: 039no, nextprevious, Links, Template, loop, Wordpress, posts, Plugin, fgtthe, Display, Thumb, default, Order, title, Thumbnails, Post, Link

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 10.0 KB

Downloads: 11

More Similar Code

This plugin creates two new template tags -- next_page_link_plus and previous_page_link_plus -- which may be used to generate next/previous navigation links for pages (if you are trying to create next/previous links for posts, use the Ambrosite Next/Previous Post Link Plus plugin instead). The new tags include the following options:

Sort the next/previous page links on any column, including alphabetically, by date, and by...

This plugin enable a feature that you can use mouse gestures to navigate to the next post or previous post or the home page when on a single post just like mouse gesture in Gmail.

Be aware that this plugin may not work in a browser...

Random Link plus textual description JavaScript can be added to your webpage to display a link in your webpage with a brief description about the link. You can also add a related title along with the links. The link is selected randomly from a...

This plugin was essentially developed for iPad but can work on all iOS devices. After activating this plugin, one can swipe left/right on their iPad to see next/previous post on post's single page and next/previous posts on listing page. This...

This Widget shows a link with an excerpt and/or a thumbnail to the next or previous post of the current one.

* You can set the title of the widget
* You can choose if there should only post considered which are in...

If you are used to link the 'previous' and 'next' posts on a wordpress blog using their own title, you have probably noticed how more often than not too long titles can cause broken lines, hence unpredictable results in terms of page layout.

AJAX Scroll links an AJAX-enabled page scroller to the standard next and previous post links.

Clicking on a next or previous link will cause the current page to fade and slide out; the following page will slide and fade in.

Unlike the Random Redirect plugin, this plugin makes sure that a user will not see the same post twice.

It does this by storing a cookie containing a list of single posts that the user has seen. It then checks that list before...

This plugin provides shortcodes and template tags for next/previous navigation in pages. Includes a code and tag for the parent page, allowing Drupal-like book navigation.

Installation :

1. Upload the next-page directory to...

Adds a "Tweet This Post" link to every post, shortens URLs, and can automatically tweet posts using OAuth. Includes the Wickett Twitter Widget. Allows you to post and schedule tweets from a new "Write Tweet" page under the...

User Review for Ambrosite Next/Previous Post Link Plus
- required fields

Please enter text on the image