<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" version="2.0">

<channel>
	<title>Hư Trúc</title>
	<atom:link href="https://hutruc.com/feed" rel="self" type="application/rss+xml"/>
	<link>https://hutruc.com</link>
	<description>Thủ Thuật Wordpress - SEO - MMO - Web Development</description>
	<lastBuildDate>Thu, 24 Jan 2019 17:08:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.2</generator>
	<itunes:explicit>no</itunes:explicit><itunes:subtitle>Thủ Thuật Wordpress - SEO - MMO - Web Development</itunes:subtitle><item>
		<title>Hướng dẫn đăng nhập nhanh WP không cần mật khẩu</title>
		<link>https://hutruc.com/wordpress/tutorials/dang-nhap-nhanh-wordpress-khong-can-mat-khau.html</link>
					<comments>https://hutruc.com/wordpress/tutorials/dang-nhap-nhanh-wordpress-khong-can-mat-khau.html#comments</comments>
		
		<dc:creator><![CDATA[HuTaNaTu]]></dc:creator>
		<pubDate>Mon, 31 Oct 2016 10:18:38 +0000</pubDate>
				<category><![CDATA[Hướng Dẫn Wordpress]]></category>
		<category><![CDATA[đăng nhập nhanh]]></category>
		<category><![CDATA[wp_set_auth_cookie]]></category>
		<guid isPermaLink="false">http://hutruc.com/?p=31</guid>

					<description><![CDATA[Trong một dự án, mình được yêu cầu chức năng đăng nhập nhanh vào wordpress. Chức năng này có tác dụng giúp bạn đăng nhập nhanh mà không cần mật khẩu. Nó hữu ích khi bạn phải đăng nhập trên một thiết bị lạ nào đấy và không muốn nhập mật khẩu. Bài viết này [&#8230;]]]></description>
										<content:encoded><![CDATA[

<div class="kk-star-ratings kksr-auto kksr-align-right kksr-valign-top"
    data-payload='{&quot;align&quot;:&quot;right&quot;,&quot;id&quot;:&quot;31&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;top&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;25&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;Rate this post&quot;,&quot;legend&quot;:&quot;5\/5 - (25 votes)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;H\u01b0\u1edbng d\u1eabn \u0111\u0103ng nh\u1eadp nhanh WP kh\u00f4ng c\u1ea7n m\u1eadt kh\u1ea9u&quot;,&quot;width&quot;:&quot;142.5&quot;,&quot;_legend&quot;:&quot;{score}\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>
            
<div class="kksr-stars">
    
<div class="kksr-stars-inactive">
            <div class="kksr-star" data-star="1" style="padding-right: 5px">
            

<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
        </div>
            <div class="kksr-star" data-star="2" style="padding-right: 5px">
            

<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
        </div>
            <div class="kksr-star" data-star="3" style="padding-right: 5px">
            

<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
        </div>
            <div class="kksr-star" data-star="4" style="padding-right: 5px">
            

<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
        </div>
            <div class="kksr-star" data-star="5" style="padding-right: 5px">
            

<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
        </div>
    </div>
    
<div class="kksr-stars-active" style="width: 142.5px;">
            <div class="kksr-star" style="padding-right: 5px">
            

<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
        </div>
            <div class="kksr-star" style="padding-right: 5px">
            

<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
        </div>
            <div class="kksr-star" style="padding-right: 5px">
            

<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
        </div>
            <div class="kksr-star" style="padding-right: 5px">
            

<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
        </div>
            <div class="kksr-star" style="padding-right: 5px">
            

<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
        </div>
    </div>
</div>
                

<div class="kksr-legend" style="font-size: 19.2px;">
            5/5 - (25 votes)    </div>
    </div>
<p>Trong một dự án, mình được yêu cầu chức năng <strong>đăng nhập nhanh vào wordpress</strong>. Chức năng này có tác dụng giúp bạn <em>đăng nhập nhanh</em> mà không cần mật khẩu. Nó hữu ích khi bạn phải đăng nhập trên một thiết bị lạ nào đấy và không muốn nhập mật khẩu. Bài viết này mình sẽ chia sẻ đến các bạn thủ thuật wordpress này.</p>
<p>Để giải quyết vấn đề này, chúng ta có nhiều phương pháp. Cũng có nhiều plugin miễn phí. Về nguyên tắc hoạt động thì chúng đều sử dụng hàm <code>wp_set_auth_cookie()</code>.</p>
<h3>Giới thiệu hàm wp_set_auth_cookie()</h3>
<p>Hàm này sẽ giúp chúng ta đặt cookie như là người dùng đã đăng nhập mà không cần phải có mật khẩu.</p>
<p>Cách sử dụng cực kỳ đơn giản:</p>
<p><code>wp_set_auth_cookie( $id_nguoi_dung_can_dang_nhap );</code></p>
<p>Bạn có thể tìm hiểu thêm về hàm này <a href="//developer.wordpress.org/reference/functions/wp_set_auth_cookie/">tại đây</a>.</p>
<figure id="attachment_39" aria-describedby="caption-attachment-39" style="width: 300px" class="wp-caption aligncenter"><img decoding="async" class="wp-image-39 size-medium" src="http://hutruc.com/wp-content/uploads/2016/10/thu-thuat-wordpress-dang-nhap-khong-can-mat-khau-300x142.png" alt="đăng nhập nhanh wordpress không cần mật khẩu" width="300" height="142" title="" srcset="https://hutruc.com/wp-content/uploads/2016/10/thu-thuat-wordpress-dang-nhap-khong-can-mat-khau-300x142.png 300w, https://hutruc.com/wp-content/uploads/2016/10/thu-thuat-wordpress-dang-nhap-khong-can-mat-khau.png 720w" sizes="(max-width: 300px) 100vw, 300px" /><figcaption id="caption-attachment-39" class="wp-caption-text">Đăng nhập nhanh wordpress không cần mật khẩu</figcaption></figure>
<h3>Ví dụ mẫu đăng nhập nhanh</h3>
<p>Ở đây mình chỉ làm một ví dụ cực kỳ đơn giản nên không bàn đến tính bảo mật ở đây nhé.</p>
<p>Tại thư mục chính của theme đang sử dụng. Bạn tạo thêm 1 page template “Quick Login Demo” chẳng hạn.</p>
<p><iframe src="https://note.vc/embed/M2F3HUIKRe" style="border:none;width:100%;min-height:400px;"></iframe>Sau đó tạo một page mới, sử dụng page template bạn vừa tạo ở trên.</p>
<p>Thay ID người dùng cho chính xác. Truy cập link page demo vừa tạo để kiểm tra.</p>
<p>Như đã nói ở trên, đây chỉ là ví dụ nhỏ không mang tính bảo mật, nên bạn đừng sử dụng thực tế.</p>
<p>Để bảo mật, bạn có thể thêm các tuỳ chọn như tạo mã an toàn chỉ sử dụng một lần, link truy cập dạng example.com/quick-login/1-qXu7w8QX7Y9lpIQq, … cái này tuỳ vào các bạn. Mình chỉ gợi ý vậy thôi.</p>
<h3>Lời kết</h3>
<p>Với chức năng này, mình cảm thấy khá thú vị, nhiều khi phải ra quán net, chỉ việc sử dụng link này để đăng nhập nhanh vào wordpress mà không cần phải lo bị lộ mật khẩu. Còn bạn thì sao? Hãy cho mình ý kiến của bạn về chức năng này nhé. Hoặc có góp ý, yêu cầu gì thì hãy phản hồi bên dưới nhé.</p>
<p>Cảm ơn bạn đã dành thời gian xem bài viết của mình. Chúc vui vẻ!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://hutruc.com/wordpress/tutorials/dang-nhap-nhanh-wordpress-khong-can-mat-khau.html/feed</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>Tìm hiểu cấu trúc link trong wordpress</title>
		<link>https://hutruc.com/wordpress/tutorials/cau-truc-link-trong-wordpress.html</link>
					<comments>https://hutruc.com/wordpress/tutorials/cau-truc-link-trong-wordpress.html#comments</comments>
		
		<dc:creator><![CDATA[HuTaNaTu]]></dc:creator>
		<pubDate>Tue, 12 Jan 2010 12:28:43 +0000</pubDate>
				<category><![CDATA[Hướng Dẫn Wordpress]]></category>
		<category><![CDATA[cấu trúc link]]></category>
		<category><![CDATA[permalink]]></category>
		<guid isPermaLink="false">http://hutruc.com/?p=87</guid>

					<description><![CDATA[Nhiều bạn mới bước chân vào viết blog trên nền WordPress (WP) cứ nghĩ đơn giản là link càng ngắn càng tốt nhưng không phải như thế. Bạn cần phải tuỳ chỉnh lại cấu trúc link để nó thân thiện với bộ máy tìm kiếm. Mình xin chia sẽ một ít kinh nghiệm về cấu [&#8230;]]]></description>
										<content:encoded><![CDATA[

<div class="kk-star-ratings kksr-auto kksr-align-right kksr-valign-top"
    data-payload='{&quot;align&quot;:&quot;right&quot;,&quot;id&quot;:&quot;87&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;top&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;22&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;Rate this post&quot;,&quot;legend&quot;:&quot;5\/5 - (22 votes)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;T\u00ecm hi\u1ec3u c\u1ea5u tr\u00fac link trong wordpress&quot;,&quot;width&quot;:&quot;142.5&quot;,&quot;_legend&quot;:&quot;{score}\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>
            
<div class="kksr-stars">
    
<div class="kksr-stars-inactive">
            <div class="kksr-star" data-star="1" style="padding-right: 5px">
            

<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
        </div>
            <div class="kksr-star" data-star="2" style="padding-right: 5px">
            

<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
        </div>
            <div class="kksr-star" data-star="3" style="padding-right: 5px">
            

<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
        </div>
            <div class="kksr-star" data-star="4" style="padding-right: 5px">
            

<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
        </div>
            <div class="kksr-star" data-star="5" style="padding-right: 5px">
            

<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
        </div>
    </div>
    
<div class="kksr-stars-active" style="width: 142.5px;">
            <div class="kksr-star" style="padding-right: 5px">
            

<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
        </div>
            <div class="kksr-star" style="padding-right: 5px">
            

<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
        </div>
            <div class="kksr-star" style="padding-right: 5px">
            

<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
        </div>
            <div class="kksr-star" style="padding-right: 5px">
            

<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
        </div>
            <div class="kksr-star" style="padding-right: 5px">
            

<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
        </div>
    </div>
</div>
                

<div class="kksr-legend" style="font-size: 19.2px;">
            5/5 - (22 votes)    </div>
    </div>
<p>Nhiều bạn mới bước chân vào viết blog trên nền WordPress (WP) cứ nghĩ đơn giản là link càng ngắn càng tốt nhưng không phải như thế. Bạn cần phải tuỳ chỉnh lại <strong>cấu trúc link</strong> để nó thân thiện với bộ máy tìm kiếm. Mình xin chia sẽ một ít kinh nghiệm về <em>cấu trúc link</em> (permalink).</p>
<p>Mặc định khi mới tạo blog xong, WP sẽ có sẳn <strong>cấu trúc link</strong> dạng:</p>
<pre>http://example.com/?p=123</pre>
<p>Để có thể thay đổi dạng cấu trúc link này thì host của bạn cần phải hổ trợ mod_rewrite. Đa số các host hiện nay đều hổ trợ.</p>
<p>Bạn đăng nhập vào phần quản trị (Dashboard) -&gt; Setting -&gt; Permalinks. Bạn sẽ thấy như hình sau:</p>
<figure id="attachment_89" aria-describedby="caption-attachment-89" style="width: 300px" class="wp-caption aligncenter"><img fetchpriority="high" decoding="async" class="size-medium wp-image-89" src="http://hutruc.com/wp-content/uploads/2010/01/cau-truc-link-trong-wordpress-300x248.jpg" alt="Cấu trúc link trong wordpress" width="300" height="248" title="" srcset="https://hutruc.com/wp-content/uploads/2010/01/cau-truc-link-trong-wordpress-300x248.jpg 300w, https://hutruc.com/wp-content/uploads/2010/01/cau-truc-link-trong-wordpress.jpg 657w" sizes="(max-width: 300px) 100vw, 300px" /><figcaption id="caption-attachment-89" class="wp-caption-text">Cấu trúc link trong wordpress</figcaption></figure>
<p>Có các tuỳ chọn cho bạn lựa chọn:</p>
<ol>
<li>Đây là dạng mặc định của WP. Link có dạng: http://example.com/?p=123</li>
<li>Link có dạng: http://example.com/nam/thang/ngay/tenbaiviet</li>
<li>Link có dạng: http://example.com/nam/thang/tenbaiviet</li>
<li>Link có dạng: http://example.com/archives/id</li>
<li>Tuỳ chọn của bạn: Nếu bạn không thích các loại trên thì bạn có thể gõ vào dạng riêng của mình. VD: /%category%/%postname%.html</li>
</ol>
<p>Một số thẻ hổ trợ:</p>
<blockquote><p>%post_id%: hiển thị số ID<br>
%post_name%: hiển thị tên bài đăng<br>
%year%: hiển thị năm của bài đăng<br>
%monthnum%: hiển thị tháng của bài đăng<br>
%day%: hiển thị ngày của bài đăng<br>
%hour%: hiển thị giờ của bài đăng<br>
%minute%: hiển thị phút của bài đăng<br>
%second%: hiển thị giây của bài đăng<br>
%category%: Tên category mà bài đăng được lưu trữ trong đó.<br>
%tag%: hiển thị theo tên Tag<br>
%author%: hiển thị theo tên tác giả.</p></blockquote>
<p>Sau khi lựa chọn cấu trúc ưng ý, bạn chỉ việc nhấn Save Changes. Lúc này hệ thống sẽ cập nhật file .htaccess (nếu file này có quyền ghi). Nếu không bạn chỉ việc copy nội dung trong khung bên dưới nút Save Changes dán vào trong file .htaccess của bạn là xong.</p>
<p>Bạn nên làm bước này và chọn một cấu trúc phù hợp ngay khi cài xong blog. Vì sau khi có nhiều bài viết mà thay đổi cấu trúc sẽ dẫn đến tình trạng gãy link và cần một khoảng thời gian để các công cụ tìm kiếm re-index lại bài viết của bạn và tất nhiên traffic sẽ giảm.</p>
<p class="note">Bài tiếp theo mình sẽ giới thiệu cách thay đổi <strong>cấu trúc link</strong> mà không ảnh hưởng đến Google. Các bạn nhớ theo dõi nha.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://hutruc.com/wordpress/tutorials/cau-truc-link-trong-wordpress.html/feed</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>