
{"id":5597,"date":"2016-09-07T01:06:06","date_gmt":"2016-09-07T01:06:06","guid":{"rendered":"http:\/\/tapchicntt.com\/?p=5597"},"modified":"2025-04-15T11:52:49","modified_gmt":"2025-04-15T04:52:49","slug":"wordpress-them-cot-url-trong-media-library-wordpress","status":"publish","type":"post","link":"https:\/\/tapchicntt.com\/wordpress-them-cot-url-trong-media-library-wordpress\/","title":{"rendered":"[WordPress] Th\u00eam c\u1ed9t URL trong media library WordPress"},"content":{"rendered":"\n<p>Trong b\u00e0i vi\u1ebft n\u00e0y, m\u00ecnh s\u1ebd h\u01b0\u1edbng d\u1eabn c\u00e1ch th\u00eam c\u1ed9t URL trong <strong>Media Library WordPress<\/strong>. T\u1ea1o th\u00eam m\u1ed9t c\u1ed9t hi\u1ec3n th\u1ecb URL gi\u00fap b\u1ea1n d\u1ec5 d\u00e0ng l\u1ea5y \u0111\u01b0\u1ee3c URL c\u1ee7a file \u0111\u00f3 \u0111\u1ec3 s\u1eed d\u1ee5ng v\u00e0o nhi\u1ec1u m\u1ee5c \u0111\u00edch.<\/p>\n\n\n\n<p>C\u00e1c b\u1ea1n v\u00e0o: <strong>Appearance &gt;&gt; Editor &gt;&gt;<\/strong> Ch\u00e8n \u0111o\u1ea1n code d\u01b0\u1edbi \u0111\u00e2y v\u00e0o file <code>functions.php<\/code>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nfunction muc_column( $cols ) {\n        $cols&#x5B;&quot;media_url&quot;] = &quot;URL&quot;;\n        return $cols;\n}\nfunction muc_value( $column_name, $id ) {\n        if ( $column_name == &quot;media_url&quot; ) echo &#039;&lt;input type=&quot;text&quot; width=&quot;100%&quot; onclick=&quot;jQuery(this).select();&quot; value=&quot;&#039;. wp_get_attachment_url( $id ). &#039;&quot; \/&gt;&#039;;\n}\nadd_filter( &#039;manage_media_columns&#039;, &#039;muc_column&#039; );\nadd_action( &#039;manage_media_custom_column&#039;, &#039;muc_value&#039;, 10, 2 );\n<\/pre><\/div>\n\n\n<p>\u201c<strong><code>URL<\/code><\/strong>\u201d : URL l\u00e0 t\u00ean c\u1ed9t<\/p>\n\n\n\n<p>Ch\u00fac c\u00e1c b\u1ea1n th\u00e0nh c\u00f4ng.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Trong b\u00e0i vi\u1ebft n\u00e0y, m\u00ecnh s\u1ebd h\u01b0\u1edbng d\u1eabn c\u00e1ch th\u00eam c\u1ed9t URL trong Media Library WordPress. T\u1ea1o th\u00eam m\u1ed9t c\u1ed9t [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":9708,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[143],"tags":[],"class_list":["post-5597","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thu-thuat-wordpress"],"views":512,"_links":{"self":[{"href":"https:\/\/tapchicntt.com\/rest-api\/wp\/v2\/posts\/5597","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tapchicntt.com\/rest-api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tapchicntt.com\/rest-api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tapchicntt.com\/rest-api\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/tapchicntt.com\/rest-api\/wp\/v2\/comments?post=5597"}],"version-history":[{"count":4,"href":"https:\/\/tapchicntt.com\/rest-api\/wp\/v2\/posts\/5597\/revisions"}],"predecessor-version":[{"id":9712,"href":"https:\/\/tapchicntt.com\/rest-api\/wp\/v2\/posts\/5597\/revisions\/9712"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tapchicntt.com\/rest-api\/wp\/v2\/media\/9708"}],"wp:attachment":[{"href":"https:\/\/tapchicntt.com\/rest-api\/wp\/v2\/media?parent=5597"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tapchicntt.com\/rest-api\/wp\/v2\/categories?post=5597"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tapchicntt.com\/rest-api\/wp\/v2\/tags?post=5597"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}