BLOG DESIGN SOLUTIONS To work with permalinks, go (Web design company)
BLOG DESIGN SOLUTIONS To work with permalinks, go to Options and then click Permalinks. It is likely that you will need to use a permalink pattern to follow the examples in this chapter. Use one of the examples shown on this page if you are not sure what you d like at this stage. You also need to activate mod_rewrite in Apache. This is as simple as uncommenting the LoadModule line in /path/to/apache/conf/ httpd.conf that refers to mod_rewrite. The Loop As mentioned in the last section, WordPress uses The Loop (http://codex.wordpress.org/ the_loop) to fetch information in different ways, depending on what page you re on. As the name implies, The Loop is a bit of code that retrieves content depending on the information given to it and then keeps looping until all the appropriate content has been retrieved. Let s take an example: Michael published 22 entries during February, 2005. If you were to load up the archives for February, 2005 on Binary Bonsai (http://binarybonsai.com/ archives/2005/02/), The Loop would go to the database and cycle one by one through all entries published during February, 2005. The Loop looks like this:
This is how WordPress retrieves entries and comments. So let s go back and break this down in English. The first bit of code says that if the database returned some posts, go on to the next line: Now that we know we have posts,let s start displaying each of them: After we have displayed all the data we have for each post, let s go ahead and stop: If there are no posts to show, show this paragraph instead: