{"id":571,"date":"2024-06-08T15:09:46","date_gmt":"2024-06-08T08:09:46","guid":{"rendered":"https:\/\/doaction.co.th\/?p=571"},"modified":"2024-12-11T12:39:33","modified_gmt":"2024-12-11T05:39:33","slug":"ready-made-wordpress-code","status":"publish","type":"post","link":"https:\/\/doaction.co.th\/en\/ready-made-wordpress-code\/","title":{"rendered":"Ready-Made WordPress Code: Instantly Solve Common Issues"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u0e1a\u0e17\u0e04\u0e27\u0e32\u0e21\u0e19\u0e35\u0e49\u0e44\u0e14\u0e49\u0e23\u0e27\u0e1a\u0e23\u0e27\u0e21\u0e42\u0e04\u0e49\u0e14\u0e2a\u0e33\u0e40\u0e23\u0e47\u0e08\u0e23\u0e39\u0e1b\u0e17\u0e35\u0e48\u0e43\u0e0a\u0e49\u0e1a\u0e48\u0e2d\u0e22\u0e43\u0e19 WordPress \u0e41\u0e25\u0e30\u0e0a\u0e48\u0e27\u0e22\u0e41\u0e01\u0e49\u0e1b\u0e31\u0e0d\u0e2b\u0e32\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e2b\u0e25\u0e32\u0e22 \u0e46 \u0e04\u0e19 \u0e16\u0e36\u0e07\u0e41\u0e21\u0e49\u0e08\u0e30\u0e44\u0e21\u0e48\u0e21\u0e35\u0e04\u0e27\u0e32\u0e21\u0e23\u0e39\u0e49\u0e40\u0e23\u0e37\u0e48\u0e2d\u0e07\u0e42\u0e04\u0e49\u0e14\u0e01\u0e47\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e19\u0e33\u0e44\u0e1b\u0e43\u0e0a\u0e49\u0e44\u0e14\u0e49\u0e17\u0e31\u0e19\u0e17\u0e35 \u0e40\u0e1e\u0e35\u0e22\u0e07\u0e41\u0e04\u0e48\u0e19\u0e33\u0e44\u0e1b\u0e27\u0e32\u0e07\u0e43\u0e19\u0e44\u0e1f\u0e25\u0e4c <code>functions.php<\/code> \u0e02\u0e2d\u0e07\u0e18\u0e35\u0e21 \u0e2d\u0e22\u0e48\u0e32\u0e07\u0e44\u0e23\u0e01\u0e47\u0e15\u0e32\u0e21 \u0e2d\u0e22\u0e48\u0e32\u0e25\u0e37\u0e21\u0e27\u0e34\u0e18\u0e35\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e42\u0e04\u0e49\u0e14\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e1b\u0e25\u0e2d\u0e14\u0e20\u0e31\u0e22 \u0e42\u0e14\u0e22\u0e01\u0e32\u0e23\u0e17\u0e14\u0e2a\u0e2d\u0e1a\u0e43\u0e19 local \u0e01\u0e48\u0e2d\u0e19 \u0e2b\u0e32\u0e01\u0e19\u0e33\u0e44\u0e1b\u0e43\u0e0a\u0e49\u0e1a\u0e19 production \u0e41\u0e25\u0e49\u0e27\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c\u0e21\u0e35\u0e1b\u0e31\u0e0d\u0e2b\u0e32 \u0e16\u0e37\u0e2d\u0e27\u0e48\u0e32\u0e40\u0e15\u0e37\u0e2d\u0e19\u0e41\u0e25\u0e49\u0e27\u0e19\u0e30\u0e04\u0e23\u0e31\u0e1a<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>\u0e2a\u0e32\u0e23\u0e1a\u0e31\u0e0d<\/h2><nav><ul><li class=\"\"><a href=\"#\u0e0b\u0e48\u0e2d\u0e19-admin-bar\">\u0e0b\u0e48\u0e2d\u0e19 Admin Bar<\/a><\/li><li class=\"\"><a href=\"#\u0e0b\u0e48\u0e2d\u0e19-admin-bar-\u0e40\u0e09\u0e1e\u0e32\u0e30\u0e04\u0e19\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e43\u0e0a\u0e48-admin\">\u0e0b\u0e48\u0e2d\u0e19 Admin bar \u0e40\u0e09\u0e1e\u0e32\u0e30\u0e04\u0e19\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e43\u0e0a\u0e48 Admin<\/a><\/li><li class=\"\"><a href=\"#\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e42\u0e25\u0e42\u0e01\u0e49\u0e17\u0e35\u0e48\u0e2b\u0e19\u0e49\u0e32-login-page\">\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e42\u0e25\u0e42\u0e01\u0e49\u0e17\u0e35\u0e48\u0e2b\u0e19\u0e49\u0e32 Login page<\/a><\/li><li class=\"\"><a href=\"#\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e04\u0e27\u0e32\u0e21\u0e22\u0e32\u0e27\u0e02\u0e2d\u0e07-excerpt\">\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e04\u0e27\u0e32\u0e21\u0e22\u0e32\u0e27\u0e02\u0e2d\u0e07 \u200bExcerpt<\/a><\/li><li class=\"\"><a href=\"#\u0e15\u0e31\u0e14\u0e04\u0e33-tag-category-archive-author-\u0e19\u0e33\u0e2b\u0e19\u0e49\u0e32\u0e2d\u0e2d\u0e01\u0e43\u0e19\u0e2b\u0e19\u0e49\u0e32-taxonomy\">\u0e15\u0e31\u0e14\u0e04\u0e33 Tag: Category: Archive: Author: \u0e19\u0e33\u0e2b\u0e19\u0e49\u0e32\u0e2d\u0e2d\u0e01\u0e43\u0e19\u0e2b\u0e19\u0e49\u0e32 Taxonomy<\/a><\/li><li class=\"\"><a href=\"#\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19-gutenberg\">\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 Gutenberg<\/a><\/li><li class=\"\"><a href=\"#\u0e15\u0e31\u0e49\u0e07\u0e2b\u0e19\u0e49\u0e32\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23-redirect-\u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01\u0e17\u0e33\u0e01\u0e32\u0e23-login\">\u0e15\u0e31\u0e49\u0e07\u0e2b\u0e19\u0e49\u0e32\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23 Redirect \u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01\u0e17\u0e33\u0e01\u0e32\u0e23 Login<\/a><\/li><li class=\"\"><a href=\"#\u0e15\u0e31\u0e49\u0e07\u0e2b\u0e19\u0e49\u0e32\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23-redirect-\u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01\u0e17\u0e33\u0e01\u0e32\u0e23-logout\">\u0e15\u0e31\u0e49\u0e07\u0e2b\u0e19\u0e49\u0e32\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23 Redirect \u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01\u0e17\u0e33\u0e01\u0e32\u0e23 Logout<\/a><\/li><li class=\"\"><a href=\"#\u0e40\u0e1e\u0e34\u0e48\u0e21-css-\u0e17\u0e35\u0e48\u0e2b\u0e25\u0e31\u0e07\u0e1a\u0e49\u0e32\u0e19\u0e41\u0e1a\u0e1a-inline\">\u0e40\u0e1e\u0e34\u0e48\u0e21 CSS \u0e17\u0e35\u0e48\u0e2b\u0e25\u0e31\u0e07\u0e1a\u0e49\u0e32\u0e19\u0e41\u0e1a\u0e1a inline<\/a><\/li><li class=\"\"><a href=\"#\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19-rest-api-\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e44\u0e14\u0e49\u0e25\u0e47\u0e2d\u0e01\u0e2d\u0e34\u0e19\">\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 REST API \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e44\u0e14\u0e49\u0e25\u0e47\u0e2d\u0e01\u0e2d\u0e34\u0e19<\/a><\/li><li class=\"\"><a href=\"#\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19-feed-\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14\">\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 Feed \u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14<\/a><\/li><li class=\"\"><a href=\"#\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e1b\u0e38\u0e48\u0e21\u0e01\u0e25\u0e31\u0e1a\u0e44\u0e1b\u0e14\u0e49\u0e32\u0e19\u0e1a\u0e19\">\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e1b\u0e38\u0e48\u0e21\u0e01\u0e25\u0e31\u0e1a\u0e44\u0e1b\u0e14\u0e49\u0e32\u0e19\u0e1a\u0e19<\/a><\/li><li class=\"\"><a href=\"#\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19-comment\">\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 Comment<\/a><\/li><li class=\"\"><a href=\"#\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19-xml-rpc\">\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 XML-RPC<\/a><\/li><li class=\"\"><a href=\"#\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19-self-pingbacks\">\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 Self Pingbacks<\/a><\/li><li class=\"\"><a href=\"#\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07-google-analytic\">\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07 Google Analytic<\/a><\/li><li class=\"\"><a href=\"#\u0e1b\u0e23\u0e31\u0e1a\u0e1c\u0e25\u0e01\u0e32\u0e23\u0e04\u0e49\u0e19\u0e2b\u0e32\u0e43\u0e2b\u0e49\u0e41\u0e2a\u0e14\u0e07\u0e04\u0e48\u0e32-post-page-\u0e40\u0e17\u0e48\u0e32\u0e19\u0e31\u0e49\u0e19\">\u0e1b\u0e23\u0e31\u0e1a\u0e1c\u0e25\u0e01\u0e32\u0e23\u0e04\u0e49\u0e19\u0e2b\u0e32\u0e43\u0e2b\u0e49\u0e41\u0e2a\u0e14\u0e07\u0e04\u0e48\u0e32 Post, Page \u0e40\u0e17\u0e48\u0e32\u0e19\u0e31\u0e49\u0e19<\/a><\/li><li class=\"\"><a href=\"#\u0e08\u0e33\u0e01\u0e31\u0e14\u0e01\u0e32\u0e23\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07\u0e41\u0e1c\u0e07\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e43\u0e0a\u0e48-admin\">\u0e08\u0e33\u0e01\u0e31\u0e14\u0e01\u0e32\u0e23\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07\u0e41\u0e1c\u0e07\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e43\u0e0a\u0e48 Admin<\/a><\/li><li class=\"\"><a href=\"#\u0e25\u0e1a\u0e40\u0e21\u0e19\u0e39-admin-bar-\u0e1a\u0e32\u0e07\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23-\u0e42\u0e25\u0e42\u0e01\u0e49-word-press-\u0e01\u0e32\u0e23\u0e2d\u0e31\u0e1e\u0e40\u0e14\u0e17-\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e19\u0e37\u0e49\u0e2d\u0e2b\u0e32\u0e43\u0e2b\u0e21\u0e48\">\u0e25\u0e1a\u0e40\u0e21\u0e19\u0e39 Admin Bar \u0e1a\u0e32\u0e07\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23 \u0e42\u0e25\u0e42\u0e01\u0e49 WordPress, \u0e01\u0e32\u0e23\u0e2d\u0e31\u0e1e\u0e40\u0e14\u0e17, \u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e19\u0e37\u0e49\u0e2d\u0e2b\u0e32\u0e43\u0e2b\u0e21\u0e48<\/a><\/li><li class=\"\"><a href=\"#\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e25\u0e34\u0e07\u0e01\u0e4c\u0e43\u0e19\u0e41\u0e16\u0e1a-admin-bar-\u0e43\u0e0a\u0e49\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e40\u0e1b\u0e47\u0e19\u0e40\u0e21\u0e19\u0e39\u0e25\u0e31\u0e14\">\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e25\u0e34\u0e07\u0e01\u0e4c\u0e43\u0e19\u0e41\u0e16\u0e1a Admin Bar ( \u0e43\u0e0a\u0e49\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e40\u0e1b\u0e47\u0e19\u0e40\u0e21\u0e19\u0e39\u0e25\u0e31\u0e14 )<\/a><\/li><li class=\"\"><a href=\"#\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e2d\u0e31\u0e1e\u0e40\u0e14\u0e17\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34\">\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e2d\u0e31\u0e1e\u0e40\u0e14\u0e17\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34<\/a><\/li><li class=\"\"><a href=\"#\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32-\u0e2a\u0e37\u0e48\u0e2d\u0e17\u0e35\u0e48\u0e2d\u0e31\u0e1e\u0e42\u0e2b\u0e25\u0e14-\u0e43\u0e2b\u0e49\u0e40\u0e2b\u0e47\u0e19\u0e44\u0e14\u0e49\u0e41\u0e04\u0e48-\u0e40\u0e09\u0e1e\u0e32\u0e30\u0e02\u0e2d\u0e07\u0e15\u0e31\u0e27\u0e40\u0e2d\u0e07\u0e40\u0e17\u0e48\u0e32\u0e19\u0e31\u0e49\u0e19-\u0e42\u0e14\u0e22\u0e22\u0e01\u0e40\u0e27\u0e49\u0e19\u0e1c\u0e39\u0e49\u0e14\u0e39\u0e41\u0e25\u0e23\u0e30\u0e1a\u0e1a\">\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32 \u0e2a\u0e37\u0e48\u0e2d\u0e17\u0e35\u0e48\u0e2d\u0e31\u0e1e\u0e42\u0e2b\u0e25\u0e14 \u0e43\u0e2b\u0e49\u0e40\u0e2b\u0e47\u0e19\u0e44\u0e14\u0e49\u0e41\u0e04\u0e48 \u0e40\u0e09\u0e1e\u0e32\u0e30\u0e02\u0e2d\u0e07\u0e15\u0e31\u0e27\u0e40\u0e2d\u0e07\u0e40\u0e17\u0e48\u0e32\u0e19\u0e31\u0e49\u0e19 \u0e42\u0e14\u0e22\u0e22\u0e01\u0e40\u0e27\u0e49\u0e19\u0e1c\u0e39\u0e49\u0e14\u0e39\u0e41\u0e25\u0e23\u0e30\u0e1a\u0e1a<\/a><\/li><li class=\"\"><a href=\"#\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e02\u0e19\u0e32\u0e14\u0e44\u0e1f\u0e25\u0e4c\u0e2a\u0e39\u0e07\u0e43\u0e19\u0e01\u0e32\u0e23\u0e2d\u0e31\u0e1e\u0e42\u0e2b\u0e25\u0e14-\u0e44\u0e21\u0e48\u0e40\u0e01\u0e34\u0e19-1-mb\">\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e02\u0e19\u0e32\u0e14\u0e44\u0e1f\u0e25\u0e4c\u0e2a\u0e39\u0e07\u0e43\u0e19\u0e01\u0e32\u0e23\u0e2d\u0e31\u0e1e\u0e42\u0e2b\u0e25\u0e14 \u0e44\u0e21\u0e48\u0e40\u0e01\u0e34\u0e19 1MB<\/a><\/li><li class=\"\"><a href=\"#\u0e41\u0e19\u0e30\u0e19\u0e33\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49-plugin-code-snippets\">\u0e41\u0e19\u0e30\u0e19\u0e33\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49 Plugin Code Snippets<\/a><\/li><li class=\"\"><a href=\"#\u0e41\u0e01\u0e49\u0e44\u0e02\u0e42\u0e04\u0e49\u0e14-functions-php-\u0e43\u0e19\u0e18\u0e35\u0e21\">\u0e41\u0e01\u0e49\u0e44\u0e02\u0e42\u0e04\u0e49\u0e14 functions.php \u0e43\u0e19\u0e18\u0e35\u0e21<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized rounded\"><img loading=\"lazy\" decoding=\"async\" width=\"1280\" height=\"960\" src=\"https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-1.webp\" alt=\"\u0e0b\u0e48\u0e2d\u0e19 Admin Bar\" class=\"wp-image-654\" style=\"width:1024px\" srcset=\"https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-1.webp 1280w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-1-300x225.webp 300w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-1-1024x768.webp 1024w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-1-768x576.webp 768w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-1-16x12.webp 16w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e0b\u0e48\u0e2d\u0e19-admin-bar\">\u0e0b\u0e48\u0e2d\u0e19 Admin Bar<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"monokai\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">add_filter('show_admin_bar', '__return_false');<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e0b\u0e48\u0e2d\u0e19-admin-bar-\u0e40\u0e09\u0e1e\u0e32\u0e30\u0e04\u0e19\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e43\u0e0a\u0e48-admin\">\u0e0b\u0e48\u0e2d\u0e19 Admin bar \u0e40\u0e09\u0e1e\u0e32\u0e30\u0e04\u0e19\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e43\u0e0a\u0e48 Admin<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"monokai\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">function hide_admin_bar_for_non_admins() {\n    \/\/ \u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e27\u0e48\u0e32\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19\u0e44\u0e21\u0e48\u0e43\u0e0a\u0e48\u0e1c\u0e39\u0e49\u0e14\u0e39\u0e41\u0e25\u0e23\u0e30\u0e1a\u0e1a \u0e41\u0e25\u0e30\u0e44\u0e21\u0e48\u0e44\u0e14\u0e49\u0e2d\u0e22\u0e39\u0e48\u0e43\u0e19\u0e2b\u0e19\u0e49\u0e32\u0e41\u0e2d\u0e14\u0e21\u0e34\u0e19\n    if (!current_user_can('administrator') && !is_admin()) {\n        \/\/ \u0e0b\u0e48\u0e2d\u0e19\u0e41\u0e16\u0e1a\u0e1c\u0e39\u0e49\u0e14\u0e39\u0e41\u0e25\u0e23\u0e30\u0e1a\u0e1a\n        show_admin_bar(false);\n    }\n}\nadd_action('after_setup_theme', 'hide_admin_bar_for_non_admins');\n<\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized rounded\"><img loading=\"lazy\" decoding=\"async\" width=\"1280\" height=\"960\" src=\"https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-3.webp\" alt=\"\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e42\u0e25\u0e42\u0e01\u0e49\u0e17\u0e35\u0e48\u0e2b\u0e19\u0e49\u0e32 Login page\" class=\"wp-image-656\" style=\"width:1024px\" srcset=\"https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-3.webp 1280w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-3-300x225.webp 300w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-3-1024x768.webp 1024w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-3-768x576.webp 768w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-3-16x12.webp 16w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e42\u0e25\u0e42\u0e01\u0e49\u0e17\u0e35\u0e48\u0e2b\u0e19\u0e49\u0e32-login-page\">\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e42\u0e25\u0e42\u0e01\u0e49\u0e17\u0e35\u0e48\u0e2b\u0e19\u0e49\u0e32 Login page<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">function custom_login_logo() {\n    ?>\n    &lt;style type=\"text\/css\">\n        #login h1 a {\n            background-image: url('&lt;?php echo get_stylesheet_directory_uri(); ?>\/path\/to\/your\/logo.png');\n            height: 80px; \/* \u0e1b\u0e23\u0e31\u0e1a\u0e04\u0e27\u0e32\u0e21\u0e2a\u0e39\u0e07\u0e15\u0e32\u0e21\u0e02\u0e19\u0e32\u0e14\u0e42\u0e25\u0e42\u0e01\u0e49 *\/\n            width: 320px; \/* \u0e1b\u0e23\u0e31\u0e1a\u0e04\u0e27\u0e32\u0e21\u0e01\u0e27\u0e49\u0e32\u0e07\u0e15\u0e32\u0e21\u0e02\u0e19\u0e32\u0e14\u0e42\u0e25\u0e42\u0e01\u0e49 *\/\n            background-size: contain; \/* \u0e1b\u0e23\u0e31\u0e1a\u0e02\u0e19\u0e32\u0e14\u0e42\u0e25\u0e42\u0e01\u0e49\u0e43\u0e2b\u0e49\u0e2d\u0e22\u0e39\u0e48\u0e43\u0e19\u0e01\u0e23\u0e2d\u0e1a *\/\n            background-repeat: no-repeat;\n            padding-bottom: 30px;\n        }\n    &lt;\/style>\n    &lt;?php\n}\nadd_action('login_enqueue_scripts', 'custom_login_logo');\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e04\u0e27\u0e32\u0e21\u0e22\u0e32\u0e27\u0e02\u0e2d\u0e07-excerpt\">\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e04\u0e27\u0e32\u0e21\u0e22\u0e32\u0e27\u0e02\u0e2d\u0e07 \u200bExcerpt<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e19\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e04\u0e27\u0e32\u0e21\u0e22\u0e32\u0e27\u0e02\u0e2d\u0e07 excerpt \u0e41\u0e1a\u0e1a\u0e19\u0e31\u0e1a\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22\nfunction custom_excerpt_length_in_chars($text, $length = 100) {\n    if (mb_strlen($text) > $length) {\n        $text = mb_substr($text, 0, $length) . '...';\n    }\n    return $text;\n}\n\n\/\/ \u0e1f\u0e34\u0e25\u0e40\u0e15\u0e2d\u0e23\u0e4c\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e43\u0e0a\u0e49\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e19\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e04\u0e27\u0e32\u0e21\u0e22\u0e32\u0e27\u0e02\u0e2d\u0e07 excerpt \u0e41\u0e1a\u0e1a\u0e19\u0e31\u0e1a\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23\nfunction apply_custom_excerpt_length($excerpt) {\n    return custom_excerpt_length_in_chars($excerpt, 100); \/\/ \u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e15\u0e31\u0e27\u0e40\u0e25\u0e02 100 \u0e40\u0e1b\u0e47\u0e19\u0e08\u0e33\u0e19\u0e27\u0e19\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\n}\nadd_filter('the_excerpt', 'apply_custom_excerpt_length');<\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized rounded\"><img loading=\"lazy\" decoding=\"async\" width=\"1280\" height=\"960\" src=\"https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-2.webp\" alt=\"\u0e15\u0e31\u0e14\u0e04\u0e33 Tag: Category: Archive: Author: \u0e19\u0e33\u0e2b\u0e19\u0e49\u0e32\u0e2d\u0e2d\u0e01\u0e43\u0e19\u0e2b\u0e19\u0e49\u0e32 Taxonomy\" class=\"wp-image-655\" style=\"width:1024px\" srcset=\"https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-2.webp 1280w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-2-300x225.webp 300w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-2-1024x768.webp 1024w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-2-768x576.webp 768w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-2-16x12.webp 16w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e15\u0e31\u0e14\u0e04\u0e33-tag-category-archive-author-\u0e19\u0e33\u0e2b\u0e19\u0e49\u0e32\u0e2d\u0e2d\u0e01\u0e43\u0e19\u0e2b\u0e19\u0e49\u0e32-taxonomy\">\u0e15\u0e31\u0e14\u0e04\u0e33 Tag: Category: Archive: Author: \u0e19\u0e33\u0e2b\u0e19\u0e49\u0e32\u0e2d\u0e2d\u0e01\u0e43\u0e19\u0e2b\u0e19\u0e49\u0e32 Taxonomy<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e19\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e15\u0e31\u0e14\u0e04\u0e33\u0e19\u0e33\u0e2b\u0e19\u0e49\u0e32\u0e1e\u0e27\u0e01 \"Tag:\", \"Archive:\", \"Category:\" \u0e2d\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e2b\u0e31\u0e27\u0e40\u0e23\u0e37\u0e48\u0e2d\u0e07\nfunction custom_archive_title($title) {\n    if (is_category()) {\n        $title = single_cat_title('', false);\n    } elseif (is_tag()) {\n        $title = single_tag_title('', false);\n    } elseif (is_post_type_archive()) {\n        $title = post_type_archive_title('', false);\n    } elseif (is_tax()) {\n        $title = single_term_title('', false);\n    }\n\n    return $title;\n}\nadd_filter('get_the_archive_title', 'custom_archive_title');\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19-gutenberg\">\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 Gutenberg<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">add_filter('use_block_editor_for_post', '__return_false', 10);<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e15\u0e31\u0e49\u0e07\u0e2b\u0e19\u0e49\u0e32\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23-redirect-\u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01\u0e17\u0e33\u0e01\u0e32\u0e23-login\">\u0e15\u0e31\u0e49\u0e07\u0e2b\u0e19\u0e49\u0e32\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23 Redirect \u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01\u0e17\u0e33\u0e01\u0e32\u0e23 Login<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19 URL \u0e02\u0e2d\u0e07\u0e42\u0e25\u0e42\u0e01\u0e49\u0e43\u0e19\u0e2b\u0e19\u0e49\u0e32\u0e40\u0e02\u0e49\u0e32\u0e2a\u0e39\u0e48\u0e23\u0e30\u0e1a\u0e1a\nfunction custom_login_logo_url() {\n    return home_url(); \/\/ \u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e40\u0e1b\u0e47\u0e19 URL \u0e02\u0e2d\u0e07\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c\u0e04\u0e38\u0e13\n}\nadd_filter('login_headerurl', 'custom_login_logo_url');<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e15\u0e31\u0e49\u0e07\u0e2b\u0e19\u0e49\u0e32\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23-redirect-\u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01\u0e17\u0e33\u0e01\u0e32\u0e23-logout\">\u0e15\u0e31\u0e49\u0e07\u0e2b\u0e19\u0e49\u0e32\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23 Redirect \u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01\u0e17\u0e33\u0e01\u0e32\u0e23 Logout<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">function custom_logout_redirect() {\n    return home_url();\n}\nadd_filter('logout_redirect', 'custom_logout_redirect');\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e40\u0e1e\u0e34\u0e48\u0e21-css-\u0e17\u0e35\u0e48\u0e2b\u0e25\u0e31\u0e07\u0e1a\u0e49\u0e32\u0e19\u0e41\u0e1a\u0e1a-inline\">\u0e40\u0e1e\u0e34\u0e48\u0e21 CSS \u0e17\u0e35\u0e48\u0e2b\u0e25\u0e31\u0e07\u0e1a\u0e49\u0e32\u0e19\u0e41\u0e1a\u0e1a inline<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u0e40\u0e1e\u0e34\u0e48\u0e21 CSS \u0e41\u0e1a\u0e1a\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e40\u0e2d\u0e07\u0e43\u0e19\u0e41\u0e1c\u0e07\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21 Admin\nfunction custom_admin_css() {\n    echo '&lt;style>\n        \/* Custom CSS \u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23 *\/\n        #wpadminbar { background-color: #23282d; }\n        .wp-admin #wpwrap { background-color: #f1f1f1; }\n    &lt;\/style>';\n}\nadd_action('admin_head', 'custom_admin_css');<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19-rest-api-\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e44\u0e14\u0e49\u0e25\u0e47\u0e2d\u0e01\u0e2d\u0e34\u0e19\">\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 REST API \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e44\u0e14\u0e49\u0e25\u0e47\u0e2d\u0e01\u0e2d\u0e34\u0e19<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">add_filter('rest_authentication_errors', function($result) {\n    if (!empty($result)) {\n        return $result;\n    }\n    if (!is_user_logged_in()) {\n        return new WP_Error('rest_not_logged_in', 'You are not currently logged in.', array('status' => 401));\n    }\n    return $result;\n});<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19-feed-\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14\">\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 Feed \u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">function disable_feeds() {\n    wp_die(__('No feed available, please visit our &lt;a href=\"'. esc_url(home_url('\/')) .'\">homepage&lt;\/a>!'));\n}\nadd_action('do_feed', 'disable_feeds', 1);\nadd_action('do_feed_rdf', 'disable_feeds', 1);\nadd_action('do_feed_rss', 'disable_feeds', 1);\nadd_action('do_feed_rss2', 'disable_feeds', 1);\nadd_action('do_feed_atom', 'disable_feeds', 1);\nadd_action('do_feed_rss2_comments', 'disable_feeds', 1);\nadd_action('do_feed_atom_comments', 'disable_feeds', 1);<\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized rounded\"><img loading=\"lazy\" decoding=\"async\" width=\"1280\" height=\"960\" src=\"https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-4.webp\" alt=\"\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e1b\u0e38\u0e48\u0e21\u0e01\u0e25\u0e31\u0e1a\u0e44\u0e1b\u0e14\u0e49\u0e32\u0e19\u0e1a\u0e19\" class=\"wp-image-657\" style=\"width:1024px\" srcset=\"https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-4.webp 1280w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-4-300x225.webp 300w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-4-1024x768.webp 1024w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-4-768x576.webp 768w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-4-16x12.webp 16w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e1b\u0e38\u0e48\u0e21\u0e01\u0e25\u0e31\u0e1a\u0e44\u0e1b\u0e14\u0e49\u0e32\u0e19\u0e1a\u0e19\">\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e1b\u0e38\u0e48\u0e21\u0e01\u0e25\u0e31\u0e1a\u0e44\u0e1b\u0e14\u0e49\u0e32\u0e19\u0e1a\u0e19<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">function add_back_to_top_button() { ?>\n    &lt;!-- Back to Top button element -->\n    &lt;a id=\"back-to-top\" href=\"#\" style=\"display: none; position: fixed; bottom: 20px; right: 20px; z-index: 100;\">\u21e7&lt;\/a>\n    &lt;script type=\"text\/javascript\">\n        document.addEventListener('DOMContentLoaded', function() {\n            \/\/ Function to show\/hide the Back to Top button\n            window.addEventListener('scroll', function() {\n                if (window.scrollY > 100) {\n                    document.getElementById('back-to-top').style.display = 'block';\n                } else {\n                    document.getElementById('back-to-top').style.display = 'none';\n                }\n            });\n            \n            \/\/ Function to scroll to the top when the button is clicked\n            document.getElementById('back-to-top').addEventListener('click', function(event) {\n                event.preventDefault();\n                window.scrollTo({\n                    top: 0,\n                    behavior: 'smooth'\n                });\n            });\n        });\n    &lt;\/script>\n&lt;?php }\nadd_action('wp_footer', 'add_back_to_top_button');\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19-comment\">\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 Comment<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0e1a\u0e32\u0e07\u0e18\u0e35\u0e21\u0e08\u0e33\u0e40\u0e1b\u0e47\u0e19\u0e15\u0e49\u0e2d\u0e07\u0e25\u0e1a\u0e44\u0e1f\u0e25\u0e4c\u0e43\u0e19\u0e40\u0e17\u0e21\u0e40\u0e1e\u0e25\u0e15\u0e14\u0e49\u0e27\u0e22<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e19\u0e04\u0e27\u0e32\u0e21\u0e04\u0e34\u0e14\u0e40\u0e2b\u0e47\u0e19\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e42\u0e1e\u0e2a\u0e15\u0e4c\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14\nfunction disable_comments_post_types_support() {\n    $post_types = get_post_types();\n    foreach ($post_types as $post_type) {\n        if (post_type_supports($post_type, 'comments')) {\n            remove_post_type_support($post_type, 'comments');\n            remove_post_type_support($post_type, 'trackbacks');\n        }\n    }\n}\nadd_action('admin_init', 'disable_comments_post_types_support');\n\n\/\/ \u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e40\u0e21\u0e19\u0e39\u0e04\u0e27\u0e32\u0e21\u0e04\u0e34\u0e14\u0e40\u0e2b\u0e47\u0e19\u0e43\u0e19\u0e41\u0e1c\u0e07\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21\nfunction disable_comments_admin_menu() {\n    remove_menu_page('edit-comments.php');\n}\nadd_action('admin_menu', 'disable_comments_admin_menu');\n\n\/\/ \u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 Widget \u0e04\u0e27\u0e32\u0e21\u0e04\u0e34\u0e14\u0e40\u0e2b\u0e47\u0e19\u0e43\u0e19\u0e41\u0e1c\u0e07\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21\nfunction disable_comments_dashboard() {\n    remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\n}\nadd_action('admin_init', 'disable_comments_dashboard');\n\n\/\/ \u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 Meta Box \u0e04\u0e27\u0e32\u0e21\u0e04\u0e34\u0e14\u0e40\u0e2b\u0e47\u0e19\u0e43\u0e19\u0e2b\u0e19\u0e49\u0e32\u0e42\u0e1e\u0e2a\u0e15\u0e4c\nfunction disable_comments_post_meta_box() {\n    remove_meta_box('commentstatusdiv', 'post', 'normal');\n    remove_meta_box('commentsdiv', 'post', 'normal');\n}\nadd_action('admin_menu', 'disable_comments_post_meta_box');\n\n\/\/ \u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e19\u0e04\u0e27\u0e32\u0e21\u0e04\u0e34\u0e14\u0e40\u0e2b\u0e47\u0e19\u0e43\u0e19\u0e2b\u0e19\u0e49\u0e32\nfunction disable_comments_status() {\n    return false;\n}\nadd_filter('comments_open', 'disable_comments_status', 20, 2);\nadd_filter('pings_open', 'disable_comments_status', 20, 2);\n\n\/\/ \u0e0b\u0e48\u0e2d\u0e19\u0e1f\u0e34\u0e25\u0e14\u0e4c\u0e04\u0e27\u0e32\u0e21\u0e04\u0e34\u0e14\u0e40\u0e2b\u0e47\u0e19\u0e43\u0e19\u0e2b\u0e19\u0e49\u0e32\nfunction disable_comments_hide_existing_comments($comments) {\n    $comments = array();\n    return $comments;\n}\nadd_filter('comments_array', 'disable_comments_hide_existing_comments', 10, 2);\n\n\/\/ \u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 RSS Feed \u0e02\u0e2d\u0e07\u0e04\u0e27\u0e32\u0e21\u0e04\u0e34\u0e14\u0e40\u0e2b\u0e47\u0e19\nfunction disable_comments_feed() {\n    wp_die(__('No feed available, please visit our &lt;a href=\"'. esc_url(home_url('\/')) .'\">homepage&lt;\/a>!'));\n}\nadd_action('do_feed_rss2_comments', 'disable_comments_feed', 1);\nadd_action('do_feed_atom_comments', 'disable_comments_feed', 1);\n\n\/\/ \u0e25\u0e1a\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e19\u0e04\u0e27\u0e32\u0e21\u0e04\u0e34\u0e14\u0e40\u0e2b\u0e47\u0e19\u0e2d\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e41\u0e16\u0e1a Admin Bar\nfunction disable_comments_admin_bar() {\n    if (is_admin_bar_showing()) {\n        remove_action('admin_bar_menu', 'wp_admin_bar_comments_menu', 60);\n    }\n}\nadd_action('init', 'disable_comments_admin_bar');\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19-xml-rpc\">\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 XML-RPC<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">add_filter('xmlrpc_enabled', '__return_false');<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19-self-pingbacks\">\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 Self Pingbacks<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">function disable_self_pingbacks(&$links) {\n    foreach ($links as $l => $link) {\n        if (0 === strpos($link, home_url())) {\n            unset($links[$l]);\n        }\n    }\n}\nadd_action('pre_ping', 'disable_self_pingbacks');\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07-google-analytic\">\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07 Google Analytic<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">function add_google_analytics() { ?>\n    &lt;script async src=\"https:\/\/www.googletagmanager.com\/gtag\/js?id=YOUR_TRACKING_ID\">&lt;\/script>\n    &lt;script>\n        window.dataLayer = window.dataLayer || [];\n        function gtag(){dataLayer.push(arguments);}\n        gtag('js', new Date());\n        gtag('config', 'YOUR_TRACKING_ID');\n    &lt;\/script>\n&lt;?php }\nadd_action('wp_head', 'add_google_analytics');\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e1b\u0e23\u0e31\u0e1a\u0e1c\u0e25\u0e01\u0e32\u0e23\u0e04\u0e49\u0e19\u0e2b\u0e32\u0e43\u0e2b\u0e49\u0e41\u0e2a\u0e14\u0e07\u0e04\u0e48\u0e32-post-page-\u0e40\u0e17\u0e48\u0e32\u0e19\u0e31\u0e49\u0e19\">\u0e1b\u0e23\u0e31\u0e1a\u0e1c\u0e25\u0e01\u0e32\u0e23\u0e04\u0e49\u0e19\u0e2b\u0e32\u0e43\u0e2b\u0e49\u0e41\u0e2a\u0e14\u0e07\u0e04\u0e48\u0e32 Post, Page \u0e40\u0e17\u0e48\u0e32\u0e19\u0e31\u0e49\u0e19<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">function custom_search_results($query) {\n    if ($query->is_search && !is_admin()) {\n        $query->set('post_type', array('post', 'page')); \/\/ \u0e08\u0e33\u0e01\u0e31\u0e14\u0e01\u0e32\u0e23\u0e04\u0e49\u0e19\u0e2b\u0e32\u0e40\u0e09\u0e1e\u0e32\u0e30\u0e42\u0e1e\u0e2a\u0e15\u0e4c\u0e41\u0e25\u0e30\u0e40\u0e1e\u0e08\n    }\n    return $query;\n}\nadd_filter('pre_get_posts', 'custom_search_results');\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e08\u0e33\u0e01\u0e31\u0e14\u0e01\u0e32\u0e23\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07\u0e41\u0e1c\u0e07\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e43\u0e0a\u0e48-admin\">\u0e08\u0e33\u0e01\u0e31\u0e14\u0e01\u0e32\u0e23\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07\u0e41\u0e1c\u0e07\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e43\u0e0a\u0e48 Admin<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">function restrict_admin_access() {\n    if (!current_user_can('administrator') && !wp_doing_ajax()) {\n        wp_redirect(home_url());\n        exit;\n    }\n}\nadd_action('admin_init', 'restrict_admin_access');<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e25\u0e1a\u0e40\u0e21\u0e19\u0e39-admin-bar-\u0e1a\u0e32\u0e07\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23-\u0e42\u0e25\u0e42\u0e01\u0e49-word-press-\u0e01\u0e32\u0e23\u0e2d\u0e31\u0e1e\u0e40\u0e14\u0e17-\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e19\u0e37\u0e49\u0e2d\u0e2b\u0e32\u0e43\u0e2b\u0e21\u0e48\">\u0e25\u0e1a\u0e40\u0e21\u0e19\u0e39 Admin Bar \u0e1a\u0e32\u0e07\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23 \u0e42\u0e25\u0e42\u0e01\u0e49 WordPress, \u0e01\u0e32\u0e23\u0e2d\u0e31\u0e1e\u0e40\u0e14\u0e17, \u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e19\u0e37\u0e49\u0e2d\u0e2b\u0e32\u0e43\u0e2b\u0e21\u0e48<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">function remove_admin_bar_items() {\n    global $wp_admin_bar;\n    $wp_admin_bar->remove_node('wp-logo'); \/\/ \u0e25\u0e1a\u0e42\u0e25\u0e42\u0e01\u0e49 WordPress\n    $wp_admin_bar->remove_node('updates'); \/\/ \u0e25\u0e1a\u0e01\u0e32\u0e23\u0e2d\u0e31\u0e1b\u0e40\u0e14\u0e15\n    $wp_admin_bar->remove_node('new-content'); \/\/ \u0e25\u0e1a\u0e40\u0e21\u0e19\u0e39\u0e40\u0e19\u0e37\u0e49\u0e2d\u0e2b\u0e32\u0e43\u0e2b\u0e21\u0e48\n}\nadd_action('wp_before_admin_bar_render', 'remove_admin_bar_items');\n<\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized rounded\"><img loading=\"lazy\" decoding=\"async\" width=\"1280\" height=\"960\" src=\"https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-5.webp\" alt=\"\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e25\u0e34\u0e07\u0e01\u0e4c\u0e43\u0e19\u0e41\u0e16\u0e1a Admin Bar ( \u0e43\u0e0a\u0e49\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e40\u0e1b\u0e47\u0e19\u0e40\u0e21\u0e19\u0e39\u0e25\u0e31\u0e14 )\" class=\"wp-image-658\" style=\"width:1024px\" srcset=\"https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-5.webp 1280w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-5-300x225.webp 300w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-5-1024x768.webp 1024w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-5-768x576.webp 768w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/ready-made-wordpress-code-5-16x12.webp 16w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e25\u0e34\u0e07\u0e01\u0e4c\u0e43\u0e19\u0e41\u0e16\u0e1a-admin-bar-\u0e43\u0e0a\u0e49\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e40\u0e1b\u0e47\u0e19\u0e40\u0e21\u0e19\u0e39\u0e25\u0e31\u0e14\">\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e25\u0e34\u0e07\u0e01\u0e4c\u0e43\u0e19\u0e41\u0e16\u0e1a Admin Bar ( \u0e43\u0e0a\u0e49\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e40\u0e1b\u0e47\u0e19\u0e40\u0e21\u0e19\u0e39\u0e25\u0e31\u0e14 )<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">function modify_admin_bar() {\n    global $wp_admin_bar;\n    $wp_admin_bar->add_menu(array(\n        'id' => 'custom_link',\n        'title' => __('Custom Link'),\n        'href' => 'http:\/\/www.example.com'\n    ));\n}\nadd_action('wp_before_admin_bar_render', 'modify_admin_bar');\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e2d\u0e31\u0e1e\u0e40\u0e14\u0e17\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34\">\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e2d\u0e31\u0e1e\u0e40\u0e14\u0e17\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">add_filter('automatic_updater_disabled', '__return_true');\nadd_filter('auto_update_core', '__return_false');\nadd_filter('auto_update_plugin', '__return_false');\nadd_filter('auto_update_theme', '__return_false');<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32-\u0e2a\u0e37\u0e48\u0e2d\u0e17\u0e35\u0e48\u0e2d\u0e31\u0e1e\u0e42\u0e2b\u0e25\u0e14-\u0e43\u0e2b\u0e49\u0e40\u0e2b\u0e47\u0e19\u0e44\u0e14\u0e49\u0e41\u0e04\u0e48-\u0e40\u0e09\u0e1e\u0e32\u0e30\u0e02\u0e2d\u0e07\u0e15\u0e31\u0e27\u0e40\u0e2d\u0e07\u0e40\u0e17\u0e48\u0e32\u0e19\u0e31\u0e49\u0e19-\u0e42\u0e14\u0e22\u0e22\u0e01\u0e40\u0e27\u0e49\u0e19\u0e1c\u0e39\u0e49\u0e14\u0e39\u0e41\u0e25\u0e23\u0e30\u0e1a\u0e1a\">\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32 \u0e2a\u0e37\u0e48\u0e2d\u0e17\u0e35\u0e48\u0e2d\u0e31\u0e1e\u0e42\u0e2b\u0e25\u0e14 \u0e43\u0e2b\u0e49\u0e40\u0e2b\u0e47\u0e19\u0e44\u0e14\u0e49\u0e41\u0e04\u0e48 \u0e40\u0e09\u0e1e\u0e32\u0e30\u0e02\u0e2d\u0e07\u0e15\u0e31\u0e27\u0e40\u0e2d\u0e07\u0e40\u0e17\u0e48\u0e32\u0e19\u0e31\u0e49\u0e19 \u0e42\u0e14\u0e22\u0e22\u0e01\u0e40\u0e27\u0e49\u0e19\u0e1c\u0e39\u0e49\u0e14\u0e39\u0e41\u0e25\u0e23\u0e30\u0e1a\u0e1a<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ Restrict media library\nfunction restrict_media_library($wp_query_obj)\n{\n  global $current_user, $pagenow;\n  if (!is_a($current_user, 'WP_User'))\n    return;\n  if ('admin-ajax.php' != $pagenow || $_REQUEST['action'] != 'query-attachments')\n    return;\n  if (!current_user_can('manage_options'))\n    $wp_query_obj->set('author', $current_user->ID);\n  return;\n}\nadd_action('pre_get_posts', 'restrict_media_library');<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e02\u0e19\u0e32\u0e14\u0e44\u0e1f\u0e25\u0e4c\u0e2a\u0e39\u0e07\u0e43\u0e19\u0e01\u0e32\u0e23\u0e2d\u0e31\u0e1e\u0e42\u0e2b\u0e25\u0e14-\u0e44\u0e21\u0e48\u0e40\u0e01\u0e34\u0e19-1-mb\">\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e02\u0e19\u0e32\u0e14\u0e44\u0e1f\u0e25\u0e4c\u0e2a\u0e39\u0e07\u0e43\u0e19\u0e01\u0e32\u0e23\u0e2d\u0e31\u0e1e\u0e42\u0e2b\u0e25\u0e14 \u0e44\u0e21\u0e48\u0e40\u0e01\u0e34\u0e19 1MB<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">function custom_upload_size_limit($size)\n{\n\t\/\/ \u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e27\u0e48\u0e32\u0e40\u0e1b\u0e47\u0e19\u0e41\u0e2d\u0e14\u0e21\u0e34\u0e19\u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48\n\tif (!current_user_can('administrator')) {\n\t\t\/\/ \u0e01\u0e33\u0e2b\u0e19\u0e14\u0e02\u0e19\u0e32\u0e14\u0e44\u0e1f\u0e25\u0e4c\u0e2a\u0e39\u0e07\u0e2a\u0e38\u0e14\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e43\u0e19\u0e2b\u0e19\u0e48\u0e27\u0e22\u0e44\u0e1a\u0e15\u0e4c (\u0e40\u0e0a\u0e48\u0e19 1MB)\n\t\t$size = 1 * 1024 * 1024; \/\/ 1MB\n\t}\n\treturn $size;\n}\n\nadd_filter('upload_size_limit', 'custom_upload_size_limit');<\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized rounded\"><img loading=\"lazy\" decoding=\"async\" width=\"1664\" height=\"1248\" src=\"https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/code-snippet.webp\" alt=\"code snippet\" class=\"wp-image-669\" style=\"width:1024px\" srcset=\"https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/code-snippet.webp 1664w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/code-snippet-300x225.webp 300w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/code-snippet-1024x768.webp 1024w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/code-snippet-768x576.webp 768w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/code-snippet-1536x1152.webp 1536w, https:\/\/doaction.co.th\/wp-content\/uploads\/2024\/06\/code-snippet-16x12.webp 16w\" sizes=\"auto, (max-width: 1664px) 100vw, 1664px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e41\u0e19\u0e30\u0e19\u0e33\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49-plugin-code-snippets\">\u0e41\u0e19\u0e30\u0e19\u0e33\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49 Plugin Code Snippets<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0e43\u0e19\u0e01\u0e23\u0e13\u0e35\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e2a\u0e30\u0e14\u0e27\u0e01\u0e41\u0e01\u0e49\u0e44\u0e1f\u0e25\u0e4c functions.php \u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e43\u0e0a\u0e49\u0e1b\u0e25\u0e31\u0e4a\u0e01\u0e2d\u0e34\u0e19 <a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Code Snippets<\/a> \u0e17\u0e35\u0e48\u0e0a\u0e48\u0e27\u0e22\u0e19\u0e33\u0e42\u0e04\u0e49\u0e14\u0e40\u0e2b\u0e25\u0e48\u0e32\u0e19\u0e35\u0e49\u0e44\u0e1b\u0e41\u0e1b\u0e30\u0e44\u0e14\u0e49\u0e40\u0e0a\u0e48\u0e19\u0e01\u0e31\u0e19 \u0e42\u0e14\u0e22\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e17\u0e33\u0e15\u0e32\u0e21\u0e44\u0e14\u0e49\u0e02\u0e31\u0e49\u0e19\u0e15\u0e2d\u0e19\u0e19\u0e35\u0e49<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add New<\/li>\n\n\n\n<li>\u0e15\u0e31\u0e49\u0e07\u0e0a\u0e37\u0e48\u0e2d Snippet <\/li>\n\n\n\n<li>\u0e43\u0e2a\u0e48\u0e42\u0e04\u0e49\u0e14\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e43\u0e19\u0e0a\u0e48\u0e2d\u0e07 \u200bCode<\/li>\n\n\n\n<li>\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e43\u0e2b\u0e49\u0e42\u0e04\u0e49\u0e14\u0e23\u0e31\u0e19<\/li>\n\n\n\n<li>\u0e04\u0e25\u0e34\u0e01\u0e1b\u0e38\u0e48\u0e21 Save \u0e41\u0e25\u0e30 Activate<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e41\u0e01\u0e49\u0e44\u0e02\u0e42\u0e04\u0e49\u0e14-functions-php-\u0e43\u0e19\u0e18\u0e35\u0e21\">\u0e41\u0e01\u0e49\u0e44\u0e02\u0e42\u0e04\u0e49\u0e14 functions.php \u0e43\u0e19\u0e18\u0e35\u0e21<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0e43\u0e19\u0e01\u0e23\u0e13\u0e35\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e44\u0e14\u0e49\u0e40\u0e02\u0e35\u0e22\u0e19\u0e18\u0e35\u0e21\u0e40\u0e2d\u0e07\u0e43\u0e2b\u0e49\u0e23\u0e30\u0e27\u0e31\u0e07\u0e01\u0e32\u0e23\u0e41\u0e01\u0e49\u0e44\u0e1f\u0e25\u0e4c functions.php \u0e40\u0e1e\u0e23\u0e32\u0e30\u0e16\u0e49\u0e32\u0e18\u0e35\u0e21\u0e21\u0e35\u0e01\u0e32\u0e23\u0e2d\u0e31\u0e1e\u0e40\u0e14\u0e17\u0e08\u0e30\u0e17\u0e33\u0e43\u0e2b\u0e49\u0e42\u0e04\u0e49\u0e14\u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e41\u0e01\u0e49\u0e19\u0e31\u0e49\u0e19\u0e16\u0e39\u0e01\u0e17\u0e31\u0e1a\u0e44\u0e14\u0e49 \u0e40\u0e1e\u0e23\u0e32\u0e30\u0e09\u0e30\u0e19\u0e31\u0e49\u0e19\u0e16\u0e49\u0e32\u0e2d\u0e22\u0e32\u0e01\u0e08\u0e30\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e42\u0e04\u0e49\u0e14\u0e43\u0e2b\u0e49\u0e44\u0e1b\u0e41\u0e01\u0e49\u0e17\u0e35\u0e48 Child theme \u0e04\u0e23\u0e31\u0e1a<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">\u0e42\u0e04\u0e49\u0e14\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14\u0e17\u0e35\u0e48\u0e23\u0e27\u0e1a\u0e23\u0e27\u0e21\u0e21\u0e32\u0e43\u0e2b\u0e49\u0e40\u0e1b\u0e47\u0e19\u0e40\u0e1e\u0e35\u0e22\u0e07\u0e01\u0e32\u0e23\u0e1b\u0e23\u0e31\u0e1a\u0e2b\u0e23\u0e37\u0e2d\u0e41\u0e01\u0e49\u0e44\u0e02\u0e1a\u0e32\u0e07\u0e08\u0e38\u0e14\u0e43\u0e19 WordPress \u0e41\u0e15\u0e48\u0e16\u0e49\u0e32\u0e2d\u0e22\u0e32\u0e01\u0e40\u0e23\u0e35\u0e22\u0e19\u0e23\u0e39\u0e49\u0e43\u0e2b\u0e49\u0e25\u0e36\u0e01\u0e02\u0e36\u0e49\u0e19 \u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e2d\u0e48\u0e32\u0e19\u0e1a\u0e17\u0e04\u0e27\u0e32\u0e21 <a href=\"https:\/\/doaction.co.th\/wordpress-theme-developer-guide\/\" data-type=\"link\" data-id=\"https:\/\/doaction.co.th\/wordpress-theme-developer-guide\/\">&#8220;\u0e40\u0e2a\u0e49\u0e19\u0e17\u0e32\u0e07\u0e2a\u0e39\u0e48\u0e01\u0e32\u0e23\u0e40\u0e1b\u0e47\u0e19 WordPress Theme Developer \u0e21\u0e37\u0e2d\u0e2d\u0e32\u0e0a\u0e35\u0e1e&#8221;<\/a> \u0e44\u0e14\u0e49\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21 \u0e2b\u0e23\u0e37\u0e2d\u0e2d\u0e22\u0e32\u0e01\u0e2b\u0e32\u0e04\u0e19\u0e17\u0e35\u0e48\u0e40\u0e0a\u0e35\u0e48\u0e22\u0e27\u0e0a\u0e32\u0e0d\u0e14\u0e49\u0e32\u0e19 WordPress \u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e15\u0e34\u0e14\u0e15\u0e48\u0e2d\u0e40\u0e23\u0e32\u0e44\u0e14\u0e49 <a href=\"https:\/\/m.me\/doactionco\">\u0e17\u0e35\u0e48\u0e19\u0e35\u0e48<\/a> \u0e16\u0e49\u0e32\u0e2b\u0e32\u0e01\u0e0a\u0e2d\u0e1a\u0e1a\u0e17\u0e04\u0e27\u0e32\u0e21\u0e19\u0e35\u0e49\u0e23\u0e1a\u0e01\u0e27\u0e19\u0e0a\u0e48\u0e27\u0e22\u0e01\u0e14\u0e44\u0e25\u0e01\u0e4c\u0e01\u0e14\u0e41\u0e0a\u0e23\u0e4c\u0e43\u0e2b\u0e49\u0e40\u0e1e\u0e08 <a href=\"https:\/\/www.facebook.com\/doactionco\" target=\"_blank\" rel=\"noopener\">do action<\/a> \u0e43\u0e2b\u0e49\u0e14\u0e49\u0e27\u0e22\u0e19\u0e30\u0e04\u0e23\u0e31\u0e1a<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article compiles commonly used pre-written code snippets for WordPress, helping many users solve various issues. Even those with no coding knowledge can use them immediately by simply placing them in the theme's `functions.php` file. However, always remember to use code safely by testing it locally first. If applied directly to a production site and problems arise, consider this a warning!<\/p>","protected":false},"author":1,"featured_media":967,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_gspb_post_css":"","inline_featured_image":false,"footnotes":""},"categories":[43],"tags":[61,59,49,62,60],"class_list":["post-571","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-knowledge","tag-code","tag-coding","tag-wordpress","tag-62","tag-60"],"acf":{"eng_thumbnail":967,"eng_title":"Ready-Made WordPress Code: Instantly Solve Common Issues","eng_description":"This article compiles ready-made code snippets commonly used in WordPress, which can help solve problems for many people. Even those without coding knowledge can use them immediately by simply placing them in the functions.php file of their theme. However, don\u2019t forget to use the code safely by testing it locally first. If you apply it directly on the production site and it causes issues, consider this a warning."},"_links":{"self":[{"href":"https:\/\/doaction.co.th\/en\/wp-json\/wp\/v2\/posts\/571","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/doaction.co.th\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/doaction.co.th\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/doaction.co.th\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doaction.co.th\/en\/wp-json\/wp\/v2\/comments?post=571"}],"version-history":[{"count":3,"href":"https:\/\/doaction.co.th\/en\/wp-json\/wp\/v2\/posts\/571\/revisions"}],"predecessor-version":[{"id":1491,"href":"https:\/\/doaction.co.th\/en\/wp-json\/wp\/v2\/posts\/571\/revisions\/1491"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/doaction.co.th\/en\/wp-json\/wp\/v2\/media\/967"}],"wp:attachment":[{"href":"https:\/\/doaction.co.th\/en\/wp-json\/wp\/v2\/media?parent=571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/doaction.co.th\/en\/wp-json\/wp\/v2\/categories?post=571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/doaction.co.th\/en\/wp-json\/wp\/v2\/tags?post=571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}