Admin Post Navigation

Admin Post Navigation

Wordpress plugin

Install on Wordpress

App Details

This plugin adds “← Previous” and “Next →” links to the “Edit Post” admin page if a previous and next post are present, respectively. The link titles (visible when hovering over the links) reveal the title of the previous/next post. The links link to the “Edit Post” admin page for the previous/next posts so that you may edit them.

By default, a previous/next post is determined by the next lower/higher valid post based on the date the post was created and which is also a post the user can edit. Other post criteria such as post type (draft, pending, etc), publish date, post author, category, etc, are not taken into consideration when determining the previous or next post.

Users can customize how post navigation ordering is handled via the “Screen Options” panel available at the top of every page when editing a post. A dropdown presents options to order navigation by: ‘ID’, ‘menu_order’, ‘post_date’, ‘post_modified’, ‘post_name’, and ‘post_title’. Post navigation can further be customized via filters (see Filters section).

NOTE: Be sure to save the post currently being edited (if you’ve made any changes) before navigating away to the previous/next post!

Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage

Filters

The plugin is further customizable via six filters. Such code should ideally be put into a mu-plugin or site-specific plugin (which is beyond the scope of this readme to explain).

c2c_admin_post_navigation_orderby (filter)

The ‘c2c_admin_post_navigation_orderby’ filter allows you to change the post field used in the ORDER BY clause for the SQL to find the previous/next post. By default this is ‘post_date’ for non-hierarchical post types (such as posts) and ‘post_title’ for hierarchical post types (such as pages). If you wish to change this, hook this filter. Note: users can customize the post navigation order field for themselves on a per-post type basis via “Screen Options” (see FAQ and screenshot for more info).

Arguments:

  • $field (string) The current ORDER BY field
  • $post_type (string) The post type being navigated
  • $user_id (int) The user’s ID

Example:

/** * Modify how Admin Post Navigation orders posts for navigation by changing the * ordering of pages by 'menu_order'. * * @param string $field The field used to order posts for navigation. * @param string $post_type The post type being navigated. * @param int $user_id. The user's ID. * @return string */ function custom_order_apn( $field, $post_type, $user_id ) { // Only change the order for the 'page' post type. if ( 'page' === $post_type ) { $field = 'menu_order'; } return $field; } add_filter( 'c2c_admin_post_navigation_orderby', 'custom_order_apn', 10, 3 ); 

c2c_admin_post_navigation_post_statuses (filter)

The ‘c2c_admin_post_navigation_post_statuses’ filter allows you to modify the list of post_statuses used as part of the search for the prev/next post. By default this array includes ‘draft’, ‘future’, ‘pending’, ‘private’, and ‘publish’. If you wish to change this, hook this filter. This is not typical usage for most users.

Arguments:

  • $post_statuses (array) The array of valid post_statuses
  • $post_type (string) The post type

Example:

/** * Modify Admin Post Navigation to allow and disallow certain post statuses from being navigated. * * @param array $post_statuses Post statuses permitted for admin navigation. * @param string $post_type The post type. * @return array */ function change_apn_post_status( $post_statuses, $post_type ) { // Add a post status. // Note: by default these are already in the $post_statuses array: 'draft', 'future', 'pending', 'private', 'publish' $post_statuses[] = 'trash'; // Remove post status(es). $post_statuses_to_remove = array( 'draft' ); // Customize here. if ( 'page' === $post_type ) { $post_statuses_to_remove[] = 'pending'; } foreach ( $post_statuses_to_remove as $remove ) { if ( false !== $index = array_search( $remove, $post_statuses ) ) { unset( $post_statuses[ $index ] ); } } return array_values( $post_statuses ); } add_filter( 'c2c_admin_post_navigation_post_statuses', 'change_apn_post_status', 10, 2 ); 

c2c_admin_post_navigation_post_types (filter)

The ‘c2c_admin_post_navigation_post_types’ filter allows you to modify the list of post_types used as part of the search for the prev/next post. By default this array includes all available post types. If you wish to change this, hook this filter.

Arguments:

  • $post_types (array) The array of valid post_types

Examples:

/** * Modify Admin Post Navigation to only allow navigating strictly for posts. * * @param array $post_types Post types that should have admin post navigation. * @return array */ function change_apn_post_types( $post_types ) { return array( 'post' ); } add_filter( 'c2c_admin_post_navigation_post_types', 'change_apn_post_types' ); /** * Modify Admin Post Navigation to disallow navigation for the 'recipe' post type. * * @param array $post_types Post types that should have admin post navigation. * @return array */ function remove_recipe_apn_post_types( $post_types ) { if ( isset( $post_types['recipe'] ) ) { unset( $post_types['recipe'] ); // Removing a post type } return $post_types; } add_filter( 'c2c_admin_post_navigation_post_types', 'remove_recipe_apn_post_types' ); 

c2c_admin_post_navigation_prev_text (filter)

The ‘c2c_admin_post_navigation_prev_text’ filter allows you to change the link text used for the ‘Previous’ link. By default this is ‘← Previous’.

Arguments:

  • $text (string) The ‘previous’ link text.

Example:

/** * Changes the text for the 'previous' link to 'Older' output by the Admin Post Navigation plugin. * * @param string $text The text used to indicate the 'next' post. * @return string */ function my_c2c_admin_post_navigation_prev_text( $text ) { return 'Older'; } add_filter( 'c2c_admin_post_navigation_prev_text', 'my_c2c_admin_post_navigation_prev_text' ); 

c2c_admin_post_navigation_next_text (filter)

The ‘c2c_admin_post_navigation_next_text’ filter allows you to change the link text used for the ‘Next’ link. By default this is ‘Next →’.

Arguments:

  • $text (string) The ‘next’ link text.

Example:

/** * Changes the text for the 'next' link to 'Newer' output by the Admin Post Navigation plugin. * * @param string $text The text used to indicate the 'next' post. * @return string */ function my_c2c_admin_post_navigation_next_text( $text ) { return 'Newer'; } add_filter( 'c2c_admin_post_navigation_next_text', 'my_c2c_admin_post_navigation_next_text' ); 

c2c_admin_post_navigation_display (filter)

The ‘c2c_admin_post_navigation_display’ filter allows you to customize the output links for the post navigation.

Arguments:

  • $text (string) The current output for the prev/next navigation link

Example:

/** * Change the markup displayed by the Admin Post Navigation plugin. * * @param string $text The text being output by the plugin. * @return string */ function override_apn_display( $text ) { // Simplistic example. You could preferably make the text bold using CSS. return '<strong>' . $text . '</strong>'; } add_filter( 'c2c_admin_post_navigation_display', 'override_apn_display' ); 

Pricing

Starting from $0 per month.

Check Out the Business Listings Widget

By Common Ninja

Business ListingsTry For Free!

App Info

Rating

Reviewers

38 reviews

Tags

admin
navigation
next
post
previous

Developed By

Scott Reilly

Quick & Easy

Find the Best Wordpress plugins for you

Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!

Testimonial

Testimonial plugins for Wordpress

Galleries

Galleries plugins for Wordpress

SEO

SEO plugins for Wordpress

Contact Form

Contact Form plugins for Wordpress

Forms

Forms plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Sliders

Sliders plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Comments

Comments plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Maps

Maps plugins for Wordpress

Security

Security plugins for Wordpress

Translation

Translation plugins for Wordpress

Ads

Ads plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Music Player

Music Player plugins for Wordpress

Backup

Backup plugins for Wordpress

Privacy

Privacy plugins for Wordpress

Optimize

Optimize plugins for Wordpress

Chat

Chat plugins for Wordpress

Countdown

Countdown plugins for Wordpress

Email Marketing

Email Marketing plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Membership

Membership plugins for Wordpress

popup

popup plugins for Wordpress

SiteMap

SiteMap plugins for Wordpress

Payment

Payment plugins for Wordpress

Coming Soon

Coming Soon plugins for Wordpress

Ecommerce

Ecommerce plugins for Wordpress

Customer Support

Customer Support plugins for Wordpress

Inventory

Inventory plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Testimonials

Testimonials plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Slider

Slider plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Membership

Membership plugins for Wordpress

Forms

Forms plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Contact

Contact plugins for Wordpress

Comments

Comments plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Common Ninja Apps

Some of the best Common Ninja plugins for Wordpress

Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.

Business Listings for Wordpress logo

Business Listings

Create business listings with a listings widget that presents companies clearly, supports easy organization, and helps visitors find the right services quickly.

Announcements for Wordpress logo

Announcements

Add announcements to your site to share important updates, keep visitors informed, and guide them toward actions that support engagement and conversions.

Process for Wordpress logo

Process

Use a process widget to present tasks in a clear visual sequence, showing each step with images and text to improve understanding and user engagement.

Popup Builder for Wordpress logo

Popup Builder

Add customizable popups to your site to capture attention, deliver messages, and drive actions like signups or conversions.

Back to Top Button for Wordpress logo

Back to Top Button

Back to top button that improves navigation, speeds up browsing, and helps visitors move smoothly through long pages for a better user experience.

Glossary for Wordpress logo

Glossary

Create an interactive glossary that displays clear definitions, images, and search options to help visitors learn terms quickly and navigate complex topics with ease.

Website Search for Wordpress logo

Website Search

Add a Google powered search bar that delivers relevant results, improves navigation, and helps visitors find content fast.

Feedback Popup for Wordpress logo

Feedback Popup

Collect user insights with a feedback popup that reveals issues early, improves user experience, and captures valuable leads through a clear feedback form.

Testimonials Slider for Wordpress logo

Testimonials Slider

Add a testimonials slider to your site to showcase real customer feedback, build credibility, and increase trust that leads to higher conversions.

Right Click Protection for Wordpress logo

Right Click Protection

Use right click protection to prevent copying by disabling right click actions, protecting your content and reducing unauthorized reuse on your site.

Animated Headline for Wordpress logo

Animated Headline

Add animated headlines to draw attention to key messages and improve user engagement through visual emphasis.

Feedback Form for Wordpress logo

Feedback Form

Collect user insights with a feedback form that gathers valuable input, improves user experience, and helps you understand visitor needs more clearly.

Discover Apps By Platform

Discover the best apps for your website

WordPress
Wix
Shopify
Weebly
Webflow
Joomla
PrestaShop
Shift4Shop
WebsiteX5
MODX
Opencart
NopCommerce

Common Ninja Search Engine

The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!

Multiple platforms