Articles tagged as “navigation

Here is a list of all articles tagged as “navigation”. If you enjoy the high-quality content that I provide here at Perishable Press, you may want to subscribe to our main content feed to stay current.

CSS/(X)HTML Tutorial: Hovering Accessibility Jump Menu
Recently, a reader named Don asked about this theme’s accessibility (accesskey) jump menu located at the top of each page. Several people have commented that they like the way the jump menu “lights up” upon gaining focus. Whenever a user hovers their cursor over the region at the top of the page, all links in the ...
Perishable Press Redirection Lounge
Welcome to the Perishable Press Redirection Lounge!
Go Back via JavaScript and PHP
Use this simple code as a button that will return users to the previous page: Here it is as a simple text link: « Go back You can make things easier by serving PHP and printing the link automatically. Here is the button link: echo ""; And here is the PHP code to print a "Go back" text link: echo "« Go back"; Better yet, you can kick the accessibility factor up a notch by using PHP’s inherent HTTP_REFERER variable to write explicitly the previous URL, thereby eliminating the JavaScript requirement (thanks ...
Passing Quotation Marks via wp_link_pages
According to the WordPress Codex 1, it is possible to pass quotation marks via the parameters of the function, wp_link_pages(). This would enable users to assign a particular css class or id to the function output, thereby providing greater design and behavioral control over that particular object. But alas, as reported several times in the WordPress Codex 2, wp_link_pages() is unable to pass quotes without causing errors. To fix this, we open template-functions-post.php and find wp_link_pages(), which is located around line #121 (for WP 2.0.2). The fix is easy, simply edit the in the following lines: $r['before'] = '' . __('Pages:'); $r['after'] = ''; For example, if you wanted to wrap the function output with a ...
Reversing WordPress Page Navigation Order
This article explains how to reverse the order of WordPress page navigation links. To reverse the default (backward) order of page navigation in WordPress, open the file template-functions-links.php (in WP 2.0) or link-template.php (in WP 2.1/2.2) and scroll down to the last function, posts_nav_link() 1. Next, find the last if statement and switch the order of the following two lines: previous_posts_link($prelabel); [ ignore this line ] next_posts_link($nxtlabel, $max_page); Next, within the first line of the same function (beginning with function posts_nav_link), switch the order of the variables $prelabel='« Previous Page' and $nxtlabel='Next Page »'. Finally, within the loop, make sure you are calling the function with the usual parameters in place. Something ...
Title Attributes for WordPress Post Navigation
Improve accessibility by adding title attributes to your WordPress userspace. Note: This article applies specifically to WordPress 2.0.2, but may be generalized to any WP 2.0+ version. By default, WordPress navigation links omit the title attributes for both page and post views. Title attributes for links provide additional information that can improve the accessibility of your website. This is especially true when images or text symbols exclusively are used for navigation. To add title attributes to WordPress page-view links (e.g., links for index, archive, and category views), open the file wp-includes/template-functions-links.php and find the functions previous_posts_link (line #494) and next_posts_link (line #459). Within each function, replace the following line: echo '">'. preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .''; ..with this: echo ...

Attention: Do NOT follow this link!