Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
AnyGantt JS Gantt Charts 8.0.0
Hex Comparison 5.12
SecureBridge 8.1
Hotelline PMS 1.0
TeeBI for RAD Studio Suite 2017
AnyStock Stock and Financial JS Charts 8.0.0
Entrepreneur News Portal 1.0.2
Advanced MLM Software 1.2
JavaScript Pop-up Box - free scripts 1.0
wolfSSL 3.12.0
Bytescout PDF SDK 1.6.0.207
Fundraiser by NCrypted Websites 1.0
Bytescout PDF To HTML SDK 8.6.0.2911
iTech StockPhoto Script 2.03
AnyMap JS Maps 8.0.0
Top Code
A Prolog Expert System 0.2.0
Cuckoo Search (CS) Algorithm 1.0
Cuckoo Optimization Algorithm 1.0
Ping Pong Game Code Script 1.1
Ticket Booking System 1.0
Discrete Cosine Transform based Image Fusion Techniques 1.0
Perl Black Book, 2nd Edition
Deliz Online Food Ordering System 1.1
Web Programming in Python: Techniques for Integrating Linux, Apache and MySQL
Online Vacation Rental Booking Website Script 4.3.0
CellSort 1.0
War Game (Version 2)
Database metadata 1.0
Hotel Management System 6.45
Classic HangMan Game 1.0
Top Rated
Jango Clone Script 1.0
Get Random Record Based on Weight 1.0.0
Travel Portal Script 9.29
Magento Product Designer 1.0
OFOS - Just Eat Clone Script 1.0
PrestaShop Upload Images Module 1.2.1
Trading Software 1.2.4
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Sine Wave Using JavaFX 1.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: 7
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: 7



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.
Features

* 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