tailieunhanh - Tìm Hiểu về Wordpress - part 26

Tham khảo tài liệu 'tìm hiểu về wordpress - part 26', 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ả | Custom loop Full control not as easy to implement Standardized and or custom CSS classes for just about anything Plugin support for extra functionality like threading and pagination Which method you decide to use depends on many factors. In general we advise you to use the wp_list_comments function to display your comments. In those cases where more control over structure presentation and functionality is desired using a custom loop is certainly going to be easier than wrestling with wp_list_ comments. In addition to these two methods there is also the old-school method of displaying comments the foreach loop which opens the door to more possibilities. In the next section of our Optimizing Comments chapter we ll explore all three of these comment-display methods and then dig into some juicy techniques for formatting and enhancing your WordPress Comments Area. Using wp_list_comments or a Custom Loop Before WordPress version the comments loop that was used to query the database and display your comments was a bit convoluted but also well-established and well-understood. It basically consisted of the following code php foreach comments as comment php comment_author_link php comment_text php endforeach Then in WordPress version comments were enhanced with optional threading and paging features. These new features are activated via the WordPress Admin 237 and require the wp_list_comments template tag to operate. Thus in and better we replace the foreach method with yep you guessed it wp_list_comments php wp_list_comments Yep that s all you need now to take advantage of WordPress default out-of-the-box comment functionality which now includes optional comment paging and threading. The old foreach loop method still works but you will need a plugin for threaded and or paged comments. If you re thinking that you need to use the old comments loop to fully customize your comments display think again. You could use the old loop setup but you would miss out on

crossorigin="anonymous">
Đã 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.