Today’s lesson is fairly easy. You’ll learn how to call for an archive link listing and the blogroll links. Tomorrow’s lesson is the calendar and search form.
Before we start, I want to explain why I’ve been breaking down my lessons into smaller lessons. Everything that you’re learning took self-taught people MONTHS to digest! It’s important that you understand everything I’m showing you the first time around so you won’t have to go back and re-check.
Step 1 – Add archive links.
Type the following codes in the Sidebar area, under the Categories listing:
Give it some tab spacings for organization. Let’s see if your codes match mine:
Save your file, refresh the browser, here’s the result:
What happened?
You used the wp_get_arhives() PHP function with the type attribute and monthly value to call for the archive links by month.
Type the following codes under the Archives link listing:
Save, refresh, and here’s the result:
By default, my blogroll is no different from yours. Here’s how it looks in the source codes:
The organization is not all there because the get_links_list() function generates the codes for you, just like the wp_list_pages() function you learned about, from yesterday’s lesson. However, it stuck with rule number one, which is close everything in the order that you open them. I circled the list item and unordered list tags for you to see.
That’s the end of today’s lesson. Come back tomorrow for the calendar and search form.
Before we start, I want to explain why I’ve been breaking down my lessons into smaller lessons. Everything that you’re learning took self-taught people MONTHS to digest! It’s important that you understand everything I’m showing you the first time around so you won’t have to go back and re-check.
Step 1 – Add archive links.
Type the following codes in the Sidebar area, under the Categories listing:
Give it some tab spacings for organization. Let’s see if your codes match mine:
Save your file, refresh the browser, here’s the result:
What happened?
You used the wp_get_arhives() PHP function with the type attribute and monthly value to call for the archive links by month.
- – open list item
– open sub-heading
- – text of the sub-heading
- – close sub-heading
- – open unordered list under the sub-heading, within the list item
- – call for archive links by month, nest each link within
- and tags. If you check your source codes (View > Page Source). You’ll see that wp_get_archives() generated list item (LI) tags for each link, just like the wp_list_cats() function.
- – close list item
Type the following codes under the Archives link listing:
Save, refresh, and here’s the result:
By default, my blogroll is no different from yours. Here’s how it looks in the source codes:
The organization is not all there because the get_links_list() function generates the codes for you, just like the wp_list_pages() function you learned about, from yesterday’s lesson. However, it stuck with rule number one, which is close everything in the order that you open them. I circled the list item and unordered list tags for you to see.
That’s the end of today’s lesson. Come back tomorrow for the calendar and search form.
Source: www.wpdesigner.com
Comments
Post a Comment