Working with WordPress Receive Updates For This Category
June 2, 2011 Working with WordPress 0 0
Comment moderation is a feature in WordPress that allows you to prevent comments from appearing on your site without your express approval. Moderation can be very useful in addressing Comment Spam, but it has more general applications as well. If you would like to learn more about comment spam, see Fighting Comment Spam.
How Moderation Works
WordPress runs a number of tests on each new comment before posting it to your blog. If a comment fails one of these tests, it is not displayed immediately on the site but is placed in a queue for moderation, the process of manual approval or deletion by the blogs administrator.
Controlling Moderation
You can control which comments get held for moderation on your Settings Discussion SubPanel page, which is located under Settings Discussion.
If you would like every comment to be held for moderation, check the An administrator must approve the comment option, listed under Before a comment appears.
If you would like to send suspicious comments to the moderation queue, while letting innocent comments through, you will need to specify a set of rules for determining which comments are suspicious. These rules are specified in on the Settings Discussion > Comment Moderation.
The first option is to hold comments for moderation if they contain an unusually large number of hyperlinks. Most normal comments contain at most one or two links while spam comments often have a large number. Look at your own comments and set this to a value that makes sense for your audience. (Note: In version 1.5.2, and possibly others, if you do not put a number in the comment moderation links box, in other words, if this box is completely blank, all anonymous comments (and possibly others) are sent to the Manage Comments SubPanel for moderation, even if the Discussion Options Subpanel has no restrictions set.)
The second option is to specify a set of moderation keys which, if present in any part of the comment, will cause it to be held for moderation. These keys are specified one per line in the large text area, which is blank by default. Moderation keys can include Spam Words, swear words, IP addresses, and Regular Expressions.
When you add a new moderation key, its a good idea to test its validity by checking previous comments. Simply use the link entitled Check past comments against moderation list, which is located underneath the text box containing moderation keys. This asks WordPress to check previous comments and tell you which ones would be flagged for moderation under your new set of keys.
The box marked Comment blacklist works in exactly the same way as the comment moderation box, except that comments that match these words will be deleted immediately and without notification. So be careful! Genuine comments could be deleted without you ever knowing they were there.
Why Not Blacklisting?
Several weblog programs take a 8220;blacklisting8221; approach to addressing comment spam. So if you tried to leave a comment that had a word or domain that was on the blacklist, then your comment would be refused.
Why did not WordPress use this method? In formulating a way to combat the problems that people were having with comments, we made a promise at the beginning, Do no harm.
Weblogs are about communication, and anything that impedes that communication is harmful to the medium. Instead of rejecting a comment that matches a term in the moderation keys (our variation on the blacklist) we simply hold it for review. That way if it was a legitimate comment mistakenly caught by the filters, the weblog author can still see it and respond to the comment.
Of course this means that there may be a lot of comments that you do not want on your site caught in the moderation queue, and in this case we have tried to make it as easy as possible to manage large numbers of comments quickly. See the articles on Fighting Comment Spam for more information and resources.
June 2, 2011 Working with WordPress 0 0
WordPress can be configured to use e-mail to post to a blog. To enable this functionality, you need to:
- Create a dedicated e-mail account to be used solely for posting to your blog,
- Configure WordPress to access that account, and
- Configure WordPress to publish messages from the e-mail account
You can blog by e-mail using most standard e-mail software programs or a Weblog Client 8212; a program specifically designed to send posts via email.
Limitations: 8211; Standard characters in the object 8211; Plain text only
WP-Cron Plugin Activation
Download, install, and activate the WP-Cron Plugin. It will work in the background without user intervention to update your site about every 15 minutes.
Cron Job Activation
Set up a UNIX cron job to have your blog periodically view http://example.com/installdir/wp-mail.php using a command-line HTTP agent like wget, curl or GET. The command to execute will look like:
wget -N http://example.com/installdir/wp-mail.php
If you use a different program than wget, substitute that program and its arguments for wget in this line.
Note: Another possibility is to run 8220;php /full/path/to/wp-mail.php8221; in a cronjob. This will run the php-script using php, without the need for an extra program to run. (You are more likely authorized to run php than wget.)
For more information about setting up a cron job, see:
- Intro To Cron Jobs
- Automating tasks with cron services at USAIL
- Your hosting providers FAQ or manual pages
June 2, 2011 Working with WordPress 0 0
Using phpMyAdmin
phpMyAdmin is a program used to manipulate databases remotely through a web interface. A good hosting package will have this included. For information on backing up your WordPress database, see Backing Up Your Database.
Information here has been tested using phpMyAdmin 2.8.0.2 running on Unix.
Restore Process
- Login to phpMyAdmin.
- Click databases, and select the database that you will be importing your data into.
- You will then see either a list of tables already inside that database or a screen that says no tables exist. This depends on your setup.
- Across the top of the screen will be a row of tabs. Click the Import tab.
- On the next screen will be a Location of Text File box, and next to that a button named Browse.
- Click Browse. Locate the backup file stored on your computer.
- Make sure the SQL radio button is checked.
- Click the Go button.
- Login to phpMyAdmin.
- Click databases, and select the database that you will be importing your data into.
- You will then see either a list of tables already inside that database or a screen that says no tables exist. This depends on your setup.
- Across the top of the screen will be a row of tabs. Click the Import tab.
- On the next screen will be a Location of Text File box, and next to that a button named Browse.
- Click Browse. Locate the backup file stored on your computer.
- Make sure the SQL radio button is checked.
- Click the Go button.
Now grab a coffee. This bit takes a while. Eventually you will see a success screen.
If you get an error message, your best bet is to post to the WordPress support forums to get help.
June 2, 2011 Working with WordPress 0 0
The Administration Panel provides access to the control features of your WordPress installation. Each Administration Panel is presented in sections, the header, the main navigation, the work area, and the footer. The top portion of all Panels, the header, is featured in light shading. The header shows the name of your blog as a link to your blogs main page, a Search Engines Blocked message if you Privacy settings block search engines, a favorites menu, and links to your profile (shown as your user name), and Log Out. Just below the top shaded area are two hanging tabs, Screen Options and contextual Help, that can be clicked to expand them.
On the left side of the screen is the main navigation menu detailing each of the administrative functions you can perform. Two expand/collapse arrows just below Dashbord and Comments allow the navigation menu to collapse to aset of icons, or expand (fly-out) to show an icon and description for each major administrative function. Within each major function, such as Posts, a pull-down arrow is presented upon hovering mouse hovers over the title area. A click of that arrow expands the menu to display each of the sub-menu choices. Clicking that arrow again collapses the sub-menu.
The large area in the middle of the screen is the work area. It is here the specific information relating to a particular navigation choice, such as adding a new post, is presented and collected.
Finally, in the footer, at the bottom of each Administration Panel in light shading, are links to WordPress, Documentation, and Feedback. In addition, the version of WordPress you have installed is shown. Just below the menu tab section, if your version is NOT the latest version, you will see the message An updated version of WordPress is available. Please update now.8221; Click on the provided link to navigate to the Updates SubPanel.
Each Panel, referred to as SubPanel, that is accessed via the main navigation menu, is presented in the boxes below. The links in those boxes will lead you to sections of this article describing those SubPanels. From those sections, you can navigate to articles detailing more information about each SubPanel. Also, WordPress Screenshots shows examples of all the SubPanels.
Many users have commented that they have uploaded images or files using the 8220;Upload8221; tab when composing blog entries, but are mystified as to why these attachments do not then appear anywhere in their blog. Some things which blog authors should be aware of:
As this article does not describe the various features of Multisite/Network, instead the Super Admin Menu article provides that information.
Dashboard 8211; Information Central
The Dashboard tells you about recent activity both at your site and in the WordPress community at large and provide access to updating WordPress, plugins, and themes.
Dashboard
The Dashboard Dashboard SubPanel provides you a number of links to start writing Posts or Pages, statistics and links on the number of posts, pages, Categories, and Post Tags. A Recent Comments box shows the number of Comments awaiting moderation and a list of the recent comments. Configurable boxes of Incoming Links, and RSS feeds from the WordPress Blog, the Plugins blog, and Planet WordPress are also displayed.
Updates
The Dashboard Updates SubPanel gives you an easy method to update WordPress, plugins, and themes. Note not all hosts will allow the automatic update process to work successfully and will require you to manually upgrade by following the Upgrading WordPress instructions.
June 2, 2011 Working with WordPress 0 0
WordPress has the ability to allow post authors to assign custom fields to a post. This arbitrary extra information is known as meta-data. This meta-data can include bits of information such as:
- Mood: Happy
- Currently Reading: Cinderella
- Listening To: Rock Around the Clock
- Weather: Hot and humid
With some extra coding, it is possible to achieve more complex actions, such as using the metadata to store an expiration date for a post.
Meta-data is handled with key/value pairs. The key is the name of the meta-data element. The value is the information that will appear in the meta-data list on each individual post that the information is associated with.
Keys can be used more than once per post. For example, if you were reading two different books (perhaps a technical book at work and a fiction at home), you could create a 8220;reading8221; key and use it twice on the same post, once for each book.
Usage
Based upon our example above, lets put this into action. We ll add two custom fields, one called 8220;Currently Reading8221; and the other 8220;Todays Mood8221;. The following instructions will demonstrate how to add this information to a post using Custom Fields.
- After you have written your post, scroll down to the area titled Custom Fields.
- To create a new Custom Field called 8220;Currently Reading8221;, enter the text 8220;Currently Reading8221; (without the quotes) in the text entry field titled Key.
- The newly created Key should now be assigned a Value, which in our case is the name of the book currently being read, 8220;Calvin and Hobbes8221;. Type 8220;Calvin and Hobbes8221; in the Value field, again without the quotes.
- Click Add Custom Field button to save this custom information for that post.
To add your 8220;Todays Mood8221;, repeat the process and add 8220;Todays Mood8221; to the key and a description of your mood in the value text boxes and click SAVE to save this information with the post.
On your next post, you can add a new book and mood to your meta-data. In the Custom Fields section, the Key will now feature a pull down list with the previously entered Custom Fields. Choose 8220;Currently Reading8221; and then enter the new book you are reading in the value. Click Add Custom Field and then repeat the process to add 8220;Todays Mood8221;.
You only need to create a new 8220;KEY8221; once, after which you can assign a value to that key for every post, if you so desire. You can also assign more than one Value to a key, for a post. This will come in handy for people who read more than one book at a time.
June 2, 2011 Working with WordPress 0 0
In WordPress, you can write either posts or pages. When you are writing a regular blog entry, you write a post. Posts automatically appear in reverse chronological order on your blogs home page. Pages, on the other hand, are for content such as 8220;About Me,8221; 8220;Contact Me,8221; etc. Pages live outside of the normal blog chronology, and are often used to present information about yourself or your site that is somehow timeless 8212; information that is always applicable. You can use Pages to organize and manage any amount of content.
Other examples of common pages include Copyright, Legal Information, Reprint Permissions, Company Information, and Accessibility Statement. (By the way, its a good idea to always have an about page and a contact page 8212; see this advice from Lorelle.)
In general, Pages are very similar to Posts in that they both have Titles and Content and can use your sites Presentation Templates to maintain a consistent look throughout your site. Pages, though, have several key distinctions that make them quite different from Posts.
Pages in a Nutshell
What Pages Are:
- Pages are for content that is less time-dependent than Posts.
- Pages can be organized into pages and SubPages.
- Pages can use different Page Templates which can include Template Files, Template Tags and other PHP code.
- Pages are not Posts, nor are they excerpted from larger works of fiction. They do not cycle through your blogs main page. (Note: You can include Posts in Pages by using the Inline Posts Plugin.)
- Pages cannot be associated with Categories and cannot be assigned Tags. The organizational structure for Pages comes only from their hierarchical interrelationships, and not from Tags or Categories.
- Pages are not files. They are stored in your database just like Posts are.
- Although you can put Template Tags and PHP code into a Page Template, you cannot put these into the content of a Page and expect them to run. (Note: You can achieve this by using a PHP evaluating Plugin such as Exec-PHP.)
- Write a page by going to Page > Add New.
- Click the Publish button to publish your page.
- Go to Pages > Edit.
- Click Edit under the name of your page.
- See the permalink under the title, and click the Edit link to change it.
What Pages are Not:
Creating Pages
To create a new Page, log in to your WordPress installation with sufficient admin privileges to create new articles. Select the Administration > Pages > Add New option to begin writing a new Page.
Changing the URL (or 8220;Slug8221;) of Your Pages
With 2.5, changing the page URL became less intuitive. If you have Permalinks enabled, and you have selected the Day and Name option (Click the Settings tab, and then click the Permalinks subtab), then the permalink automatically shows up below your post title when you start typing in the body of your post (not just the title).
Permalink settings
However, if you have a different permalink option selected, or if you do not have permalinks enabled at all, you must do the following to edit your page URL:
Thus, if you do not have the right permalink option enabled, you have to publish your pages before you can set the URLs.
June 2, 2011 Working with WordPress 0 0
Settings Discussion
The Settings Discussion SubPanel allows you to set the options concerning comments (also called discussion). It is here the administrator decides if comments are allowed, if pingbacks and trackbacks are acceptable, and what constitutes Comment Spam. On this SubPanel you also control the circumstances under which your blog sends you e-mail notification of certain events at your site.
Discussion Settings
Default article setting
These settings may be overridden for individual articles.
- Attempt to notify any blogs linked to from the article (slows down posting) 8211; If you check this box, WordPress will send out a ping to a site or article you have linked to in your post. Your mention of their site or article will show up in the comment section of their site, if that site allows pingbacks. The notfication occurs during the process of publishing your article to the internet. An article with many hyperlinks will slow the posting process as WordPress contacts all of the sites before the post is published.
- Allow link notifications from other blogs (pingbacks and trackbacks) 8211; Check this box so WordPress to accepts or declines the pings from other sites which may reference your site or an article on your site. If this box is checked, pingbacks and trackbacks will appear in the comments section of your posts.
- Allow people to post comments on the article 8211; Check this box if you wish to allow comments to your posts. Remember that this can be overridden for individual articles. Comments can also be controlled by making an article PRIVATE, which requires the appropriate password before a comment is allowed. If you do not wish to allow comments uncheck this setting.
June 2, 2011 Working with WordPress 0 0
In WordPress 2.5, media management has been vastly improved. You can manage your existing files, and upload new ones directly using buttons on the editor toolbar.
This is a guide to using Image and File Attachments, about which there is some confusion as to functionality in WordPress 2.5. It is intended to answer the following questions:
- How do image and file attachments work?
- How do I use the feature?
- What is the attachment.php template page all about?
Prerequisite for Uploading Files
In order to use all these tools, you have to change the chmod of wp-content folder to 777. If you have not changed permissions in order to write in wp-content folder, you will not be able to use the uploader. If you do not know how to change this value, please read Changing File Permissions. Remember to reset the folder permissions after the uploads directory has been created inside wp-content.
How Image and File Attachments Work in WordPress 2.5 Posts
WordPress 2.5 uses a fully integrated upload system in the editor toolbar. Earlier versions used a separate upload tab. The add media section contains four buttons: add image, add video, add audio, add media. When you click on add image, a panel comes up that allows you to upload a new image or use an existing image. Existing images come from the gallery or the media library. The gallery includes images in the current article. The media library includes images uploaded in any post or page.
There is also a new media library section, where you can view, edit and delete (but not add) media files.
How Image and File Attachments Work in WordPress 2.0 Posts
Many users have commented that they have uploaded images or files using the 8220;Upload8221; tab when composing blog entries, but are mystified as to why these attachments do not then appear anywhere in their blog. Some things which blog authors should be aware of:
- The area beneath the post-editing window is essentially a file library, allowing you to Upload and Browse uploaded files and images. They do not become 8220;attachments8221; until you actually Insert them into the post. Therefore, it is a misnomer to call them attachments; it may be more accurate to call them 8220;embedded files.8221;
- The options for inserting images and file links into your post are available by Clicking on the thumbnail in the 8220;Browse8221; or 8220;Browse All8221; tab (which function like browsable libraries of uploaded files). Once you click, a small popup 8220;menu8221; should appear with toggles for what kind of hyperlink to wrap the image or file link in, and for actually inserting the library item.
- Depending on what options you select from the aforementioned popup 8220;menu8221; (and we use this term loosely, because it does not function like a typical popup menu, as you will see below), the inserted item may or may not make use of your attachment.php template page. If the appropriate options are selected from the popup menu, as discussed below, then a visitor who clicks on the item in the blog post will be taken to the page styled by the attachment.php template file if such a file exists in the theme you are using.
Complete Usage Instructions
These instructions assume you are in the Admin back end of your WordPress site.
- To create a new blog entry, click Write. To edit an existing post, click Manage and click Edit next to the desired post.
- Beneath the text-editor window you should see a section with Upload as its heading. If the file or image you wish to attach to the blog entry has already been uploaded and you want to use it again, then you should see a tab next to Upload which is labeled Browse All. Click this tab and then skip to the last step in these instructions to insert the file or image.
- Click Browse and find the file on your local computer. Note It is recommended that you make your filename 8220;server friendly.8221; Make sure the filename has no spaces, apostrophes, slashes or other non-alphanumeric characters (such as $, % and &). Rename the file before uploading if it does. To preserve readability, some people replace spaces with the underline character. For instance, My File Name.txt becomes My_File_Name.txt.
- Select the file on your computer, just like you were navigating to and opening a file in a word-processing program, and click Open. The dialog box will close and the filename will now be filled in next to File.
- Under Title type a short, plain-language descriptive title for the file.
- Under Description, type a slightly longer, more descriptive note about the contents of the file or image.
- Click Upload.
- The Browse tab should now be visible and highlighted next to Upload. You may click back to Upload and upload more files if you wish. Once you are done, click back to Browse.
- Now whatever files or images you have uploaded are sitting there on the Web server, waiting to be used. If you click Browse it will show all the files that the program thinks are relevant to this post.
- Finally insert the image or file into the post. For inserting images, see Inserting Images below. For files, see Inserting Files.
June 2, 2011 Working with WordPress 0 0
Ajax (Asynchronous JavaScript And XML) is a technology that allows a web page to perform actions or update dynamically, without completely reloading. The idea is that by using Ajax technology, a web site can be more responsive and interactive than a non-Ajax site. For instance, without Ajax, Google Maps might require you to click a link on the left side of the map and wait for the page to reload in order to scroll the map to the left. With Ajax, you can instead simply drag the map to scroll, and while there might be a small delay, it is a much shorter delay and less disruptive process than if you had to wait for the entire page to load.
How does Ajax work?
Ajax technology is actually fairly simple to describe. Basically, the web programmer connects a link, button, or some other type of user interface element on the web page to a JavaScript program. When the user activates the interface (clicks on the link, drags the mouse, etc.), the JavaScript program sends some information or a request for data to a URL on the web server. Next, a program on the web server (probably also created by the web programmer) processes the request and sends back a response or some data. Typically the data is in XML format, but that is not actually required. When the data or response arrives in the browser, the JavaScript program receives an 8220;asynchronous8221; notification, so that it can be processed or displayed appropriately.
Today, Ajax is supported in some form by most visual web browsers (though only if the user has JavaScript turned on). Of course, like most complex JavaScript, there are differences between how browsers implement JavaScript. However, these are not too difficult to overcome. The only real restriction on Ajax is that the URL you send the information to has to be on the same web site as the URL the JavaScript came from. Other than that, the uses for the technology are only limited to what you can figure out how to program
Ajax in WordPress
Because of its responsiveness, Ajax technology is being adopted by all sorts of web sites 8212; and WordPress is no exception. Currently, the core of WordPress uses Ajax only in the administration screens. For instance, Ajax is used for instant updates when you are doing comment moderation, and when you are adding and deleting items from lists such as categories, blogroll, and posts; Ajax is also the technology behind the auto-save functionality on post and page editing screens. Several themes and plugins also use Ajax; for instance, some post rating plugins use Ajax to store the visitors rating in the database and then display an updated average rating.
June 2, 2011 Working with WordPress 0 0
Posts are the entries that display in reverse chronological order on your home page. In contrast to pages, posts usually have comments fields beneath them and are included in your site RSS feed.
To write a post:
- Log in to your WordPress Administration Panel (Dashboard).
- Click the Posts tab.
- Click the Add New Sub Tab
- Start filling in the blanks.
- As needed, select a category, add tags, and make other selections from the sections below the post. Each of these sections is explained below.
When you are ready, click Publish.
Descriptions of Post Fields
WordPress Admin
Writing Post Advanced
Panel 8211; Top of Page
Title
The title of your post. You can use any words or phrases. Avoid using the same title twice as that will cause problems. You can use commas, apostrophes, quotes, hypens/dashes, and other typical symbols in the post like 8220;My Site 8211; Here s Looking at You, Kid.8221; WordPress will clean it up for the link to the post, called the post-slug.
Post Editing Area
The blank box where you enter your writing, links, links to images, and any information you want to display on your site. You can use either the Visual or the HTML view to compose your posts. For more on the HTML view, see the section below, Visual Versus HTML View.
Preview button
Allows you to view the post before officially publishing it.
Publish box n
Post Editing Area
The blank box where you enter your writing, links, links to images, and any information you want to display on your site. You can use either the Visual or the HTML view to compose your posts. For more on the HTML view, see the section below, Visual Versus HTML View.
Preview button
Allows you to view the post before officially publishing it.
Publish box n
Preview button
Allows you to view the post before officially publishing it.
Publish box n
Publish box n
Contains buttons that control the state of your post. The main states are Published, Pending Review, and Draft. A Published status means the post has been published on your blog for all to see. Pending Review means the draft is waiting for review by an editor prior to publication. Draft means the post has not been published and remains a draft for you. If you select a specific publish status and click the update post or Publish button, that status is applied to the post. For example, to save a post in the Pending Review status, select Pending Review from the Publish Status drop-down box, and click Save As Pending. (You will see all posts organized by status by going to Posts > Edit). To schedule a post for publication on a future time or date, click 8220;Edit8221; in the Publish area next to the words 8220;Publish immediately8221;. You can also change the publish date to a date in the past to back-date posts. Change the settings to the desired time and date. You must also hit the 8220;Publish8221; button when you have completed the post to publish at the desired time and date
Visibility 8211; This determines how your post appears to the world. Public posts will be visible by all website visitors once published. Password Protected posts are published to all, but visitors must know the password to view the post content. Private posts are visible only to you (and to other editors or admins within your site)
Permalink
After you save your post, the Permalink below the title shows the potential URL for the post, as long as you have permalinks enabled. (To enable permalinks, go to Settings > Permalinks.) The URL is generated from your title. In previous versions of WordPress, this was referred to as the 8220;page-slug.8221; The commas, quotes, apostrophes, and other non-HTML favorable characters are changed and a dash is put between each word. If your title is 8220;My Site 8211; Heres Looking at You, Kid8221;, it will be cleaned up to be 8220;my-site-heres-lookin-at-you-kid8221; as the title. You can manually change this, maybe shortening it to 8220;my-site-lookin-at-you-kid8221;.
Save
Allows you to save your post as a draft / pending review rather than immediately publishing it. To return to your drafts later, visit Posts 8211; Edit in the menu bar, then select your post from the list.
Publish
Publishes your post on the site. You can edit the time when the post is published by clicking the Edit link above the Publish button and specifying the time you want the post to be published. By default, at the time the post is first auto-saved, that will be the date and time of the post within the database.
