TAILIEUCHUNG - Hướng dẫn tạo themes cho wordpress part 4

Một số trong những người quan trọng hơn như sau: Các thông số Tên Số Feed current_ thể loại Effect Pass một giá trị số để hạn chế số lượng các hạng mục thu hồi. Điều này đặc biệt hữu ích cho blog với một số lượng lớn các loại. Pass thực sự gây ra một liên kết đến thức ăn của mỗi loại được in Pass ID của một thể loại để buộc các đầu ra để có các lớp học hiện nay con mèo trên một thể loại cụ thể | Chapter 2 Some of the more important ones are as follows Parameter Name Effect Number Pass a numeric value to limit the number of categories retrieved. This is especially helpful for blogs with a large number of categories. Feed Pass true to cause a link to each category s feed to be printed current_ category Pass the ID of a category to force the output to contain the current-cat class on a particular category. For example say you wanted to limit your category list to the first five categories. To do so you would use the following code php wp_list_categories array number 5 For more information on the available parameters visit http Template_Tags wp_list_categories. Listing all of the tags in use on a blog Generally tags are used liberally to indicate the subject matter of a post. For this reason a list of tags is a great way to help visitors to get around a blog and view a wide array of posts that they re interested in. By default WordPress lists tags in a cloud varying the size of each tag according to the number of times it was used. However this default output can be modified to produce a list that might make more sense to your users. How to do it First decide where you want to generate a linked list of all of your tags. Open the appropriate template file and insert the following php wp_tag_cloud array format list unit Creating Navigation Next open your theme in your browser and take a look at the spot where you inserted the appropriate code. Depending on your site s styles the output for this function call should look like the example shown in following screenshot How it works. When you call wp_tag_cloud WordPress performs a database query fetching all of the tags that match the parameters you pass to the function. After fetching the tags WordPress builds the markup for the list. Using the parameters in the previous code the markup consists of an li tag containing a link to the categories archive page for each category that was fetched. The

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.