=== Cross-references === Contributors: hervada Tags: cross-references,backlinks,links,posts,related Requires at least: 2.2 Tested up to: 2.3 Stable tag: 1.2 Insert cross-references between posts or pages and get all back references via template. == Description == With this plugin you can easily set a reference to another post or page in posts und pages and you get all back references automatically listed for every post and page. * Forward links. When writing your posts, you can refer to other posts by their ID number, like so: [cref 12]. This is shown at the blog as the title of post #12 with a link to it. * Back links. To show a list of all the posts that link to the current post, put <?php the_crossreferences() ?> in your templates, for example at the page single.php of your current theme. Usage details: * If you want to get another description instead of the post title, write it after the id: [cref 12 see above]. This is shown at the blog as "see above" with a link to post #12. * If you write [cref.from 12] you do not see a forward link, but both posts get linked to each other as a back link (appear at the "related posts" list). * The parameters from template function are the_crossreferences($before,$between,$after,$id) $before - Optional. This string being printed once before the related posts list (only if there is 1 related post or more) $between - Optional. This string being printed between 2 entries in the related posts list. $after - Optional. This string being printed once after the related posts list (only if there is 1 related post or more) $id - Optional. The post id number to which the related posts list are shown. If not given, the current post is assumed. Examples: If you write <?php the_crossreferences() ?> you get an output such as: <li>Post title 1</li><li>Post title 2</li><li>Post title 3</li> (if there are 3 related posts) Nothing (if there are no related posts) If you write <?php the_crossreferences('See also:', '; ', '.') ?> you get an output such as: See also: Post title 1; Post title 2; Post title 3.(if there are 3 related posts) Nothing (if there are no related posts) If you write <?php the_crossreferences('<h2>Related posts</h2><li>') ?> you get an output such as: <h2>Related posts</h2><li>Post title 1</li><li>Post title 2</li> (if there are 2 related posts) Nothing (if there are no related posts) If you write <h2>Related posts</h2><?php the_crossreferences() ?> you get an output such as: <h2>Related posts</h2><li>Post title 1</li><li>Post title 2</li> (if there are 2 related posts) <h2>Related posts</h2> (if there are no related posts) == Installation == 1. Upload `crossreferences.php` to the `/wp-content/plugins/` directory 1. Activate the plugin through the 'Plugins' menu in WordPress 1. Place `` in your templates where you want to get the back links == Frequently Asked Questions == = Are references automatically updated whenever the refered/referer post title changes? = Yes, since the title of the post is read dynamically when it is shown. = What happens if I delete a post to which there are references? = All links will be removed from the referer posts, but their text (possibly the title of the removed post) will remain unchanged. = What happens if I set a references to a draft/pending/private post? = No links will be shown on the referer posts (just possibly the title of the hidden post) until it is made public. The hidden post will also not appear at the back links list from other posts. The same happens if you set a reference to a published post and then you hide it. == Change Log == 1.2 No links are shown to or from draft/pending/private posts (9/24/2007) 1.1 First public release (9/15/2007)