{"id":3280,"date":"2017-02-06T16:12:29","date_gmt":"2017-02-06T16:12:29","guid":{"rendered":"https:\/\/www.codebee.co.th\/labs\/?p=3280"},"modified":"2017-04-22T05:32:41","modified_gmt":"2017-04-22T05:32:41","slug":"%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%94%e0%b8%b6%e0%b8%87-post-%e0%b8%a5%e0%b9%88%e0%b8%b2%e0%b8%aa%e0%b8%b8%e0%b8%94%e0%b8%82%e0%b8%ad%e0%b8%87-wordpress","status":"publish","type":"post","link":"https:\/\/www.codebee.co.th\/labs\/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%94%e0%b8%b6%e0%b8%87-post-%e0%b8%a5%e0%b9%88%e0%b8%b2%e0%b8%aa%e0%b8%b8%e0%b8%94%e0%b8%82%e0%b8%ad%e0%b8%87-wordpress\/","title":{"rendered":"\u0e27\u0e34\u0e18\u0e35\u0e14\u0e36\u0e07 post \u0e25\u0e48\u0e32\u0e2a\u0e38\u0e14\u0e02\u0e2d\u0e07 wordpress \u0e21\u0e32\u0e41\u0e2a\u0e14\u0e07\u0e19\u0e2d\u0e01 blog"},"content":{"rendered":"<h3>\u0e27\u0e34\u0e18\u0e35\u0e14\u0e36\u0e07 post \u0e25\u0e48\u0e32\u0e2a\u0e38\u0e14\u0e02\u0e2d\u0e07 wordpress \u0e21\u0e32\u0e41\u0e2a\u0e14\u0e07\u0e19\u0e2d\u0e01 blog<\/h3>\n<p><\/br><br \/>\n<strong>\u0e27\u0e34\u0e18\u0e35\u0e14\u0e36\u0e07 post \u0e25\u0e48\u0e32\u0e2a\u0e38\u0e14\u0e02\u0e2d\u0e07 wordpress \u0e21\u0e32\u0e41\u0e2a\u0e14\u0e07\u0e19\u0e2d\u0e01 blog<\/strong><br \/>\nWordpress \u0e40\u0e1b\u0e47\u0e19 CMS \u0e17\u0e31\u0e01\u0e21\u0e31\u0e01\u0e08\u0e30\u0e19\u0e34\u0e22\u0e21\u0e19\u0e33\u0e44\u0e1b\u0e43\u0e0a\u0e49\u0e43\u0e19\u0e01\u0e32\u0e23\u0e17\u0e33 blog \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e40\u0e02\u0e35\u0e22\u0e19\u0e02\u0e48\u0e32\u0e27\u0e2b\u0e23\u0e37\u0e2d\u0e1a\u0e17\u0e04\u0e27\u0e32\u0e21\u0e02\u0e2d\u0e07\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c \u0e0b\u0e36\u0e48\u0e07\u0e21\u0e31\u0e01\u0e08\u0e30\u0e40\u0e1b\u0e47\u0e19\u0e40\u0e19\u0e37\u0e49\u0e2d\u0e2b\u0e32\u0e17\u0e35\u0e48\u0e41\u0e22\u0e01\u0e2a\u0e48\u0e27\u0e19\u0e08\u0e32\u0e01\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c\u0e2b\u0e25\u0e31\u0e01 \u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c\u0e2b\u0e19\u0e49\u0e32\u0e41\u0e23\u0e01\u0e2d\u0e32\u0e08\u0e08\u0e30\u0e16\u0e39\u0e01\u0e1e\u0e31\u0e12\u0e19\u0e32\u0e02\u0e36\u0e49\u0e19\u0e21\u0e32\u0e42\u0e14\u0e22\u0e44\u0e21\u0e48\u0e43\u0e0a\u0e49 CMS \u0e41\u0e25\u0e30\u0e41\u0e22\u0e01\u0e2a\u0e48\u0e27\u0e19\u0e02\u0e48\u0e32\u0e27\u0e2a\u0e32\u0e23 \u0e2a\u0e48\u0e27\u0e19\u0e17\u0e35\u0e48\u0e21\u0e35\u0e40\u0e19\u0e37\u0e49\u0e2d\u0e2b\u0e32\u0e22\u0e32\u0e27 \u0e46 \u0e2d\u0e2d\u0e01\u0e44\u0e1b\u0e44\u0e27\u0e49\u0e43\u0e19\u0e2a\u0e48\u0e27\u0e19\u0e02\u0e2d\u0e07\u0e1a\u0e25\u0e47\u0e2d\u0e01\u0e41\u0e25\u0e30\u0e43\u0e0a\u0e49 CMS \u0e2d\u0e22\u0e48\u0e32\u0e07 wordpress \u0e43\u0e19\u0e01\u0e32\u0e23\u0e08\u0e31\u0e14\u0e01\u0e32\u0e23\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e41\u0e17\u0e19 <!--more--><\/p>\n<p><\/br><\/p>\n<p>\u0e1b\u0e31\u0e0d\u0e2b\u0e32\u0e04\u0e37\u0e2d \u0e40\u0e21\u0e37\u0e48\u0e2d\u0e40\u0e23\u0e32\u0e41\u0e22\u0e01\u0e2a\u0e48\u0e27\u0e19\u0e23\u0e30\u0e2b\u0e27\u0e48\u0e32\u0e07 wordpress \u0e41\u0e25\u0e30\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c\u0e2b\u0e25\u0e31\u0e01\u0e0b\u0e36\u0e48\u0e07\u0e16\u0e39\u0e01\u0e1e\u0e31\u0e12\u0e19\u0e32\u0e02\u0e36\u0e49\u0e19\u0e21\u0e32\u0e08\u0e32\u0e01\u0e23\u0e30\u0e1a\u0e1a\u0e17\u0e35\u0e48\u0e41\u0e15\u0e01\u0e15\u0e48\u0e32\u0e07\u0e01\u0e31\u0e19 \u0e17\u0e33\u0e43\u0e2b\u0e49\u0e40\u0e23\u0e32\u0e44\u0e21\u0e48\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07\u0e15\u0e48\u0e32\u0e07 \u0e46 \u0e2b\u0e23\u0e37\u0e2d\u0e16\u0e36\u0e07\u0e08\u0e30\u0e43\u0e0a\u0e49\u0e44\u0e14\u0e49\u0e01\u0e47\u0e2d\u0e32\u0e08\u0e08\u0e30\u0e15\u0e34\u0e14\u0e1b\u0e31\u0e0d\u0e2b\u0e32\u0e1a\u0e32\u0e07\u0e2d\u0e22\u0e48\u0e32\u0e07 \u0e17\u0e33\u0e43\u0e2b\u0e49\u0e44\u0e21\u0e48\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e41\u0e2a\u0e14\u0e07 post \u0e25\u0e48\u0e32\u0e2a\u0e38\u0e14\u0e02\u0e2d\u0e07 wordpress \u0e43\u0e19\u0e2b\u0e19\u0e49\u0e32\u0e40\u0e1e\u0e08\u0e2b\u0e25\u0e31\u0e01\u0e17\u0e35\u0e48\u0e41\u0e22\u0e01\u0e23\u0e30\u0e1a\u0e1a\u0e01\u0e31\u0e19\u0e44\u0e14\u0e49 \u0e2d\u0e35\u0e01\u0e27\u0e34\u0e18\u0e35\u0e2b\u0e19\u0e36\u0e48\u0e07\u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e08\u0e30\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e42\u0e2b\u0e25\u0e14 post \u0e25\u0e48\u0e32\u0e2a\u0e38\u0e14\u0e02\u0e2d\u0e07 wordpress \u0e21\u0e32\u0e41\u0e2a\u0e14\u0e07\u0e44\u0e14\u0e49\u0e01\u0e47\u0e04\u0e37\u0e2d\u0e01\u0e32\u0e23 query \u0e15\u0e23\u0e07 \u0e25\u0e2d\u0e07\u0e21\u0e32\u0e14\u0e39\u0e01\u0e31\u0e19\u0e04\u0e23\u0e31\u0e1a\u0e27\u0e48\u0e32\u0e08\u0e30\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e40\u0e02\u0e35\u0e22\u0e19\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07\u0e44\u0e14\u0e49\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e44\u0e23\u0e1a\u0e49\u0e32\u0e07<br \/>\n<\/br><\/p>\n<h4>\u0e42\u0e2b\u0e25\u0e14 post \u0e25\u0e48\u0e32\u0e2a\u0e38\u0e14\u0e21\u0e32\u0e41\u0e2a\u0e14\u0e07\u0e19\u0e2d\u0e01 wordpress<\/h4>\n<p>\u0e2b\u0e25\u0e31\u0e01\u0e01\u0e32\u0e23\u0e17\u0e33\u0e01\u0e47\u0e07\u0e48\u0e32\u0e22 \u0e46 \u0e04\u0e23\u0e31\u0e1a\u0e04\u0e37\u0e2d\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07\u0e10\u0e32\u0e19\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e02\u0e2d\u0e07 wordpress \u0e42\u0e14\u0e22\u0e15\u0e23\u0e07\u0e40\u0e25\u0e22 \u0e41\u0e15\u0e48\u0e42\u0e14\u0e22\u0e15\u0e23\u0e07\u0e1b\u0e01\u0e15\u0e34\u0e41\u0e25\u0e49\u0e27\u0e10\u0e32\u0e19\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e02\u0e2d\u0e07 wordpress \u0e01\u0e47\u0e04\u0e48\u0e2d\u0e19\u0e02\u0e49\u0e32\u0e07\u0e0b\u0e31\u0e1a\u0e0b\u0e49\u0e2d\u0e19\u0e1e\u0e2d\u0e2a\u0e21\u0e04\u0e27\u0e23 \u0e40\u0e23\u0e32\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e43\u0e0a\u0e49\u0e01\u0e32\u0e23 query \u0e40\u0e1e\u0e35\u0e22\u0e07\u0e04\u0e23\u0e31\u0e49\u0e07\u0e40\u0e14\u0e35\u0e22\u0e27\u0e41\u0e25\u0e30 loop \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e41\u0e2a\u0e14\u0e07 post \u0e02\u0e2d\u0e07 wordpress \u0e44\u0e14\u0e49\u0e40\u0e25\u0e22\u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<br \/>\n<\/br><br \/>\n<strong>\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e40\u0e0a\u0e37\u0e48\u0e2d\u0e21\u0e15\u0e48\u0e2d\u0e10\u0e32\u0e19\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e02\u0e2d\u0e07 wordpress<\/strong><\/p>\n<pre class=\"lang:default decode:true \" >$hostname = \"localhost\";\r\n$username = \"db username\";\r\n$password = \"db password\";\r\n$dbname = \"db name\";\r\n\r\nmysql_connect($hostname, $username, $password) or die(\"Unble to connect Database\");\r\nmysql_query(\"SET NAMES UTF8\");\r\n@mysql_select_db(\"$dbname\") or die(\"Unble to connect database\");<\/pre>\n<p><\/br><br \/>\n<strong>\u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19\u0e01\u0e47\u0e17\u0e33\u0e01\u0e32\u0e23 query \u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e41\u0e25\u0e30 loop \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e41\u0e2a\u0e14\u0e07 post \u0e15\u0e32\u0e21\u0e08\u0e33\u0e19\u0e27\u0e19\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23<\/strong><\/p>\n<pre class=\"lang:default decode:true \" >\r\n$result = mysql_query('SELECT p1.*, wm2.meta_value FROM wp_posts p1 LEFT JOIN\r\n\t\t\t\t\twp_postmeta wm1 ON (\r\n\t\t\t\t\twm1.post_id = p1.id\r\n\t\t\t\t\tAND wm1.meta_value IS NOT NULL\r\n\t\t\t\t\tAND wm1.meta_key = \"_thumbnail_id\"\r\n\t\t\t\t\t)\r\n\t\t\t\t\tLEFT JOIN wp_postmeta wm2 ON (wm1.meta_value = wm2.post_id AND wm2.meta_key = \"_wp_attached_file\"\r\n\t\t\t\t\tAND wm2.meta_value IS NOT NULL) WHERE p1.post_status=\"publish\" AND p1.post_type=\"post\"\r\n\t\t\t\t\tORDER BY p1.post_date DESC');\r\n$i = 0;\r\n$max_post = 5;\t\t\t\t\t\r\nwhile ($i&lt;$max_post){\r\n\t\t$row = mysql_fetch_array($result);\r\n\t\t$post_date = $row['post_date'];\r\n\t\t$post_title = $row['post_title'];\r\n\t\t$post_thumbnail = $row['meta_value'];\r\n\t\t$link = $row['guid'];\r\n\t\t$post_content = $row['post_content'];\r\n\t\t$content = explode('&lt;!--more--&gt;',$post_content);\r\n        $i++;\r\n}<\/pre>\n<p><\/br><br \/>\n<strong>\u0e2d\u0e18\u0e34\u0e1a\u0e32\u0e22\u0e15\u0e31\u0e27\u0e41\u0e1b\u0e23\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21<\/strong><br \/>\n<strong>$max_post<\/strong> \u0e04\u0e37\u0e2d\u0e08\u0e33\u0e19\u0e27\u0e19 post \u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e14\u0e36\u0e07\u0e21\u0e32\u0e41\u0e2a\u0e14\u0e07<br \/>\n<strong>$post_date<\/strong> \u0e04\u0e37\u0e2d\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e02\u0e2d\u0e07 post \u0e17\u0e35\u0e48\u0e16\u0e39\u0e01\u0e2a\u0e23\u0e49\u0e32\u0e07<br \/>\n<strong>$post_title<\/strong> \u0e04\u0e37\u0e2d\u0e2b\u0e31\u0e27\u0e02\u0e49\u0e2d\u0e02\u0e2d\u0e07 post \u0e19\u0e31\u0e49\u0e19<br \/>\n<strong>$post_thumbnail<\/strong> \u0e04\u0e37\u0e2d\u0e23\u0e39\u0e1b\u0e02\u0e2d\u0e07 post \u0e2b\u0e23\u0e37\u0e2d featured image \u0e43\u0e2b\u0e49\u0e0a\u0e35\u0e49\u0e44\u0e1b\u0e17\u0e35\u0e48\u0e42\u0e1f\u0e25\u0e40\u0e14\u0e49\u0e2d uploads \u0e02\u0e2d\u0e07 wordpress<br \/>\n<strong>$link<\/strong> \u0e04\u0e37\u0e2d url \u0e17\u0e35\u0e48\u0e08\u0e30\u0e1e\u0e32\u0e44\u0e1b\u0e2b\u0e19\u0e49\u0e32\u0e40\u0e19\u0e37\u0e49\u0e2d\u0e2b\u0e32\u0e02\u0e2d\u0e07 post<br \/>\n<strong>$content<\/strong> \u0e04\u0e37\u0e2d\u0e40\u0e19\u0e37\u0e49\u0e2d\u0e2b\u0e32\u0e41\u0e1a\u0e1a\u0e22\u0e48\u0e2d\u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e44\u0e27\u0e49 \u0e17\u0e35\u0e48\u0e04\u0e31\u0e48\u0e19\u0e14\u0e49\u0e27\u0e22\u0e41\u0e17\u0e47\u0e01 more<\/p>\n<p>\u0e16\u0e49\u0e32\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e40\u0e19\u0e37\u0e49\u0e2d\u0e2b\u0e32\u0e41\u0e1a\u0e1a\u0e40\u0e15\u0e47\u0e21 \u0e01\u0e47\u0e43\u0e0a\u0e49\u0e15\u0e31\u0e27\u0e41\u0e1b\u0e23 <strong>$post_content<\/strong> \u0e41\u0e17\u0e19<\/p>\n<p><\/br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0e27\u0e34\u0e18\u0e35\u0e14\u0e36\u0e07 post \u0e25\u0e48\u0e32\u0e2a\u0e38\u0e14\u0e02\u0e2d\u0e07 wordpress \u0e21\u0e32\u0e41\u0e2a\u0e14\u0e07\u0e19\u0e2d\u0e01 blog \u0e27\u0e34\u0e18\u0e35\u0e14\u0e36\u0e07 post \u0e25\u0e48\u0e32\u0e2a\u0e38\u0e14\u0e02\u0e2d\u0e07 wordpress \u0e21\u0e32\u0e41\u0e2a\u0e14\u0e07\u0e19\u0e2d\u0e01 blog Wordpress \u0e40\u0e1b\u0e47\u0e19 CMS \u0e17\u0e31\u0e01\u0e21\u0e31\u0e01\u0e08\u0e30\u0e19\u0e34\u0e22\u0e21\u0e19\u0e33\u0e44\u0e1b\u0e43\u0e0a\u0e49\u0e43\u0e19\u0e01\u0e32\u0e23\u0e17\u0e33 blog \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e40\u0e02\u0e35\u0e22\u0e19\u0e02\u0e48\u0e32\u0e27\u0e2b\u0e23\u0e37\u0e2d\u0e1a\u0e17\u0e04\u0e27\u0e32\u0e21\u0e02\u0e2d\u0e07\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c \u0e0b\u0e36\u0e48\u0e07\u0e21\u0e31\u0e01\u0e08\u0e30\u0e40\u0e1b\u0e47\u0e19\u0e40\u0e19\u0e37\u0e49\u0e2d\u0e2b\u0e32\u0e17\u0e35\u0e48\u0e41\u0e22\u0e01\u0e2a\u0e48\u0e27\u0e19\u0e08\u0e32\u0e01\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c\u0e2b\u0e25\u0e31\u0e01 \u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c\u0e2b\u0e19\u0e49\u0e32\u0e41\u0e23\u0e01\u0e2d\u0e32\u0e08\u0e08\u0e30\u0e16\u0e39\u0e01\u0e1e\u0e31\u0e12\u0e19\u0e32\u0e02\u0e36\u0e49\u0e19\u0e21\u0e32\u0e42\u0e14\u0e22\u0e44\u0e21\u0e48\u0e43\u0e0a\u0e49&#8230;<\/p>\n","protected":false},"author":1,"featured_media":887,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"video","meta":{"footnotes":""},"categories":[46],"tags":[1533,1214,1213,1216,1215,1091,1212,936],"class_list":{"0":"post-3280","1":"post","2":"type-post","3":"status-publish","4":"format-video","5":"has-post-thumbnail","6":"hentry","7":"category-website-development-","8":"tag-codebeeagency","9":"tag-wordpress-latest-post","10":"tag-wordpress--post-","11":"tag-wordpress-","12":"tag--wordpress","14":"tag--post--wordpress","16":"post_format-post-format-video"},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/posts\/3280","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/comments?post=3280"}],"version-history":[{"count":13,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/posts\/3280\/revisions"}],"predecessor-version":[{"id":3293,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/posts\/3280\/revisions\/3293"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/media\/887"}],"wp:attachment":[{"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/media?parent=3280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/categories?post=3280"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/tags?post=3280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}