{"id":15497990,"url":"https://github.com/scribu/wp-smarter-navigation","last_synced_at":"2025-07-08T21:36:32.704Z","repository":{"id":68896627,"uuid":"1148758","full_name":"scribu/wp-smarter-navigation","owner":"scribu","description":"A WordPress plugin that generates previous \u0026 next post links based on referrer.","archived":false,"fork":false,"pushed_at":"2015-09-24T00:39:51.000Z","size":185,"stargazers_count":10,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-18T15:53:39.983Z","etag":null,"topics":["wordpress"],"latest_commit_sha":null,"homepage":"http://wordpress.org/extend/plugins/smarter-navigation/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scribu.png","metadata":{"files":{"readme":"readme.txt","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-12-08T04:08:22.000Z","updated_at":"2023-04-27T22:12:10.000Z","dependencies_parsed_at":"2023-03-11T04:24:50.625Z","dependency_job_id":null,"html_url":"https://github.com/scribu/wp-smarter-navigation","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scribu%2Fwp-smarter-navigation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scribu%2Fwp-smarter-navigation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scribu%2Fwp-smarter-navigation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scribu%2Fwp-smarter-navigation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scribu","download_url":"https://codeload.github.com/scribu/wp-smarter-navigation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250331806,"owners_count":21413100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["wordpress"],"created_at":"2024-10-02T08:41:36.591Z","updated_at":"2025-04-22T22:04:34.209Z","avatar_url":"https://github.com/scribu.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"=== Smarter Navigation ===\nContributors: scribu, versusbassz\nTags: navigation, previous, next, referrer\nRequires at least: 3.2\nTested up to: 3.5\nStable tag: 1.4\nLicense: GPLv2 or later\nLicense URI: http://www.gnu.org/licenses/gpl-2.0.html\n\nGenerates more specific previous / next post links based on referrer.\n\n== Description ==\n\nWhen displaying a single post, you might want to show links to the previous and next posts in the same category.\n\nThat's fine; WordPress let's you do this with `previous_post_link()` and `next_post_link()`.\n\nBut what if that post is in multiple categories?\n\nWhat if the user came to that post from a tag page or from an author page? Wouldn't it make more sense to display previous / next posts from that particular set?\n\nWell, you can do this with a similar pair of functions, provided by this plugin: `previous_post_smart()` and `next_post_smart()`.\n\nHere's how it works:\n\nWhenever a visitor goes to an archive page (category, tag, date, author, search etc.), the plugin notes which archive it is in a browser cookie.\n\nThen, if the visitor goes to a single post from that archive page, the plugin generates the prev / next links based on the information in the cookie.\n\nLinks: [Plugin News](http://scribu.net/wordpress/smarter-navigation) | [Author's Site](http://scribu.net)\n\n== Installation ==\n\n1. Unzip the archive and put the folder into your plugins folder (/wp-content/plugins/).\n1. Activate the plugin from the Plugins admin menu.\n\n= Basic usage =\n\nGo to your theme directory and open single.php.\n\nReplace \n\n`previous_post_link(` with `previous_post_smart(` \n\nand\n\n`next_post_link(` with `next_post_smart(`\n\n= Referrer link =\n\nIf you also want to display a link back to the list of posts, add this line (also in single.php):\n\n`\u003c?php referrer_link(); ?\u003e`\n\n= Posts with multiple categories =\n\nIf you want for example to [higlight the category](http://wordpress.org/support/topic/366588) that the user came from, you can use `get_referrer_category()` to retrieve the category object.\n\nFor further reference, all the template tags are located in [smarter-navigation/template-tags.php](http://plugins.trac.wordpress.org/browser/smarter-navigation/trunk/template-tags.php).\n\n== Frequently Asked Questions ==\n\n= \"Parse error: syntax error, unexpected...\" Help! =\n\nMake sure your host is running PHP 5. Add this line to wp-config.php to check:\n\n`var_dump(PHP_VERSION);`\n\n== Changelog ==\n\n= 1.4 =\n* added support for custom taxonomies. props badfeather\n* fixed strict standards errors. props badfeather\n\n= 1.3.2 =\n* fix case when plugin worked incorrect with pagination\n\n= 1.3.1 =\n* fix case when multiple browser tabs are involved\n* fix case when multiple posts have the exact same date\n\n= 1.3 =\n* store query vars in cookie instead of individual post ids\n* fix referer link\n* [more info](http://scribu.net/wordpress/smarter-navigation/sn-1-3.html)\n\n= 1.2.1 =\n* enable $in_same_cat by default\n\n= 1.2 =\n* moved to PHP5 syntax\n* added get_referrer_category() and get_referrer_url() template tags\n* added $in_same_cat and $excluded_categories arguments to previous_post_smart() \u0026 next_post_smart()\n* [more info](http://scribu.net/wordpress/smarter-navigation/sn-1-2.html)\n\n= 1.1.2 =\n* added $fallback parameter to *_post_smart()\n\n= 1.1.1 =\n* better SQL limit\n\n= 1.1 =\n* handles posts split on multiple pages\n* better behaviour when multiple tabs open\n* [more info](http://scribu.net/wordpress/smarter-navigation/sn-1-1.html)\n\n= 1.0 =\n* initial release\n* [more info](http://scribu.net/wordpress/smarter-navigation/sn-1-0.html)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscribu%2Fwp-smarter-navigation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscribu%2Fwp-smarter-navigation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscribu%2Fwp-smarter-navigation/lists"}