Jump Menu : Content | Explore | Search | Home | Sitemap | Contact | Login | Access.

Articles tagged with “php

Customize WordPress Quicktags
Note: This condensed tutorial assumes you are working with WordPress 2+ and are familiar with editing .php and/or .js files. WordPress quicktags1 provide shortcuts for adding certain bits of code to your posts. The default set of quicktags includes some handy shortcut buttons for tags such as , , and , as well as a few others. While the default set of quicktag buttons is occasionally useful, a quick bit of quicktag customization can easily transform your personal ...
Auto Clear and Restore Form Elements
Using a small bit of JavaScript, it is possible to auto-clear and restore form elements when users bring focus to them. Simply copy, paste, and modify the following code example to achieve an effect similar to this:   ...
Display the Total Number of WordPress Posts, Comments, and Categories
Would you like to display the total number of posts, comments, and categories for your WordPress-powered website? Here is the code that can make it happen 1!...
Execute External WordPress Functions
To execute WordPress functions in an external directory (i.e., outside of the WordPress install directory), it is necessary to include a call to “wp-blog-header.php” at the top of the external file. For example, if your WordPress-powered blog is located in a subdirectory called “blog” and the external file is in the domain root (e.g., the external file is located directly in http://domain.com/), add the following code to the top of the external file: This may be generalized ...
WordPress Search Function Notes
Code to call an external WordPress search form: Code for a standard, inline WordPress search form: "> Code to try if the search function fails and ...
Backup that Database with phpMyAdmin
DB Export Settings Backing up your database as often as possible is essential. For WordPress, as well as for other applications, plugins and other scripts that help automate the task are easily obtainable. However, for several reasons, it is a good idea to understand the process of manually creating a backup copy of your database. This brief tutorial1 should help cement the process ...
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 ...
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 ...
Permalink Enlightenment
I recently enabled the permalinks feature for a fresh WordPress 2.0.2 upgrade. The process required several hours of research and approximately 90 minutes to fully implement. This brief article summarizes the process and applies to at least the following setup: WordPress 2.0.2 Apache Server with mod_rewrite enabled The ability to access/modify your .htaccess file(s) You have decided to use the /%year%/%monthnum%/%day%/%postname%/ permalink format (actually, any format will work; simply swap your preferred format for the one mentioned here) You may also be ...
WordPress RDF Source Makeover
Beautiful Source-Code Output, Part 1: Whip your WordPress RDF Code into Submission Update: This article applies specifically to WordPress 2.0.2, but may be generalized to any WP 2.0+ version. I love looking at beautiful source-code output. However WordPress tends to spit code out in random chunks, often leaving spaces, line breaks, and tabs littered throughout the source output. This messes things up. Lists don’t look like lists and logically written code often appears scattered along the page carelessly. Often, ...
WordPress Notes Plus
Welcome to Perishable Press! This article covers many different aspects of WordPress functionality, including customizing quicktags, deleting the cache, numbering comments & posts, changing password text, and displaying archive menus. Note that this article was written for previous versions (i.e., less than 2.0) of WordPress. Discrepancies may exist between the code presented in this post and that of more recent versions of WordPress. Nonetheless, this information is presented for ...
PHP Notes Plus
Welcome to "PHP Notes Plus" -- an online repository of basic PHP expressions and statements.. Common Statements: "\n" = new line "\t" = tab "\r" = carriage return "\$" = dollar sign "\"" = double quote Example usage: "\n\t$category->cat_name" echo '' . "\n"; echo "\n\t\n\n"; echo Multiple Lines of Code echo ...

• Up • Forward »


Set CSS to lite theme
Set CSS to dark theme