คำสั่งพื้นฐาน เวิร์ดเพรส

[table width=”100%”]
คำสั่ง,คำอธิบาย
the_title();,แสดงหัวข้อ
the_ID();,แสดงไอดี
echo($post->post_name);,แสดงslug
the_content();,แสดงเนื้อหาแบบเต็ม
the_excerpt();,แสดงเนื้อแบบตัดทอน
the_post_thumbnail();,แสดงรูปพิเศษ(featured)
echo get_the_date();,แสดงวันที่ปัจจุบัน
echo get_the_time();,แสดงเวลาปัจจุบัน
“edit_post_link();”,แสดงปุ่มแก้ไข
the_permalink();,แสดงurlปัจจุบัน
get_template_directory_uri();,แสดงurlของธีมส์
bloginfo(‘stylesheet_directory’);,แสดงurlของธีมส์
“echo esc_url( home_url( ‘/’ ) );”,แสดงurlหน้าหลักของเว็บไซต์
the_author();,แสดงผู้เขียน
the_author_meta(‘description’);,แสดงข้อมูลผู้เขียน
“echo get_avatar();”,แสดงรูปภาพของผู้เขียน
“the_category(‘, ‘);”,แสดงหมวดหมู่
echo category_description();,แสดงรายละเอียดของหมวดหมู่
“the_tags(‘Tags: ‘, ‘,’ , ‘ ‘);”,แสดงคำสำสัญ
“the_taxonomies( array(‘template’ => ‘%s: %l’) );”,แสดงหมวดหมู่taxonomies
“posts_nav_link(‘ ‘,’ ‘,’ Previous’);”,แสดงปุ่มโพสก่อนหน้า
“posts_nav_link(‘ ‘,’Next’,’ ‘);”,แสดงปุ่มโพสถัดไป
get_search_form();,แสดงฟอร์มค้นหา
bloginfo( ‘name’ );,แสดงหัวข้อเว็บไซต์
bloginfo( ‘description’ );,แสดงคำโปรยเว็บไวต์
[/table]

นักพัฒนาเว็บไซต์ด้วยระบบเวิร์ดเพรส เป็นผู้ช่วยให้กับ SeedWebs & SeedThemes และ เปิดธุรกิจเล็กๆ อยู่ในอำเภอปาย