Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Tham khảo tài liệu 'thiết kế giao diện wordpress phần 5', công nghệ thông tin, đồ họa - thiết kế - flash phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 3 Category Links with how many posts per category This displays your categories using the wp_list_categories template tag. A BlogRoll set of links This list is controlled by the wp_list_bookmarks template tag which displays bookmarks found in the Administration Blogroll Manage Blogroll panel. A set of Meta links links to info about the site These links are hand-coded into the sidebar.php page in the default template. Search Pages S About Archives s September 2007 s July 2007 Categories s Features 3 s Office Productivity 1 s Uncategorized 1 Blogroll s Alex s Donncha s Dougal s Matt s Michel s Mike s Ryan Meta s Site Admin s Logout s Valid xhtml s X FN s WordPress Generally the above works out great for a more standard blog. But as discussed I would like my page links to display horizontally up top of my sidebar and I want my theme to display a vertical sidebar that looks more like the contents page of a magazine. 75 Coding It Up Time For Action 1. To start I ll be treating my archives as Past Issues. So showing the month and year will be just fine. Under my Past Issues heading I ll add the following code which will display my archive links wrapped in unordered list elements -- start archive list-- ul class tocNav php wp_get_archives type monthly ul -- end archive list-- Formatting tip You ll see I ve wrapped each bit of PHP and its template tag in ul class . unordered list XHTML markup . WordPress will automatically return each item wrapped in li list item tags . Adding the unordered list tags or ol ordered list tags if you want. ensures I have a valid list that is easy for me to customize with my CSS. XHTML comments You ll also note that I m wrapping most of my WordPress code in -- -- XHTML comment tags. I do this so that scanning the markup is easier for myself and any other developer who comes across the code a nice idea for those of you who are looking forward to creating commercial themes to make a little money the more clear your markup the less time .