TAILIEUCHUNG - Tìm Hiểu về Wordpress - part 9

Tham khảo tài liệu 'tìm hiểu về wordpress - part 9', 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ả | The WordPress Loop The loop is the one thing that is absolutely core to understanding how WordPress j Bad analogy works. In its most basic generalized form the loop looks like this Bad anaaog php Jr The Loop if have_posts while have_posts the_post . endwhile else . endif As veteran developers know a while loop is a standard concept in any programming language and its use here is just standard PHP. First the loop makes sure that there are some posts to display the if statement . If that is true it begins the loop. Then the function the_post sets the stage for WordPress to use inner-loop functions which we will explore soon. Once the_post has been iterated the specified number of times have_posts turns to false and the loop stops. Yikes That is sounding pretty abstract. Perhaps we better break things down so we don t lose each other. 67 The Loop in Plain English Are there any posts published Sorry just had to ask the rest of this code will go funky if there aren t any. Begin the loop. This will cycle through the number of Posts you have set to display under Settings Reading . A header tag with an anchor link inside it. The text will be the title of the Post and the link will be the permalink to the single Post page. A custom field that is attached to this Post is pulled out and displayed. In this case the key of PostThumb which returns an img tag symbolizing this Post. Meta information about the Post is displayed the Month Day Year the Post was published and the display name of the Author who wrote it. The full content of the Post is displayed. More meta information about the post is displayed all the tags and categories given to this Post and the number of comments which is a link to the commenting area. End of the loop------------------------------------------- If there are older or newer posts available display links to them. No posts a failsafe ------------------------------------ Better tell the people. ---------------------------------- All .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.