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

<channel>
	<title>WordPress归档 - 猪 i0oo0</title>
	<atom:link href="https://i0oo0.com/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>https://i0oo0.com/tag/wordpress/</link>
	<description>爱猪</description>
	<lastBuildDate>Thu, 21 Feb 2019 21:52:55 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.5</generator>

<image>
	<url>https://i0oo0.com/wp-content/uploads/2019/02/favicon-2.png</url>
	<title>WordPress归档 - 猪 i0oo0</title>
	<link>https://i0oo0.com/tag/wordpress/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>WordPress修改删减评论区</title>
		<link>https://i0oo0.com/2019/02/21/wordpress%e4%bf%ae%e6%94%b9%e5%88%a0%e5%87%8f%e8%af%84%e8%ae%ba%e5%8c%ba/</link>
					<comments>https://i0oo0.com/2019/02/21/wordpress%e4%bf%ae%e6%94%b9%e5%88%a0%e5%87%8f%e8%af%84%e8%ae%ba%e5%8c%ba/#comments</comments>
		
		<dc:creator><![CDATA[大猪帆]]></dc:creator>
		<pubDate>Thu, 21 Feb 2019 21:52:55 +0000</pubDate>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[修改]]></category>
		<category><![CDATA[评论]]></category>
		<guid isPermaLink="false">https://i0oo0.com/?p=117</guid>

					<description><![CDATA[<p>				WordPress的评论区是默认的。还需要email、网站、姓名什么的。作为一个中文站。还是把评论框里的网站之类的框框删掉好了。电子邮件可以暂时保留，以后如果觉得没必要可以再删。另外WordPress默认给评论区的配字是“Leave a Reply” 这个也可以顺便改了。		</p>
<p><a href="https://i0oo0.com/2019/02/21/wordpress%e4%bf%ae%e6%94%b9%e5%88%a0%e5%87%8f%e8%af%84%e8%ae%ba%e5%8c%ba/">WordPress修改删减评论区</a>最先出现在<a href="https://i0oo0.com">猪 i0oo0</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>WordPress的评论区是默认的。还需要email、网站、姓名什么的。国外可能比较土吧，而且互联网发展较早，所以人人都有Email，有自己博客或者自己网站的人也非常多。我们中国则发展迅速，几年之间从无到有，所以大家现在基本都依赖微信 聊天、传文件。电子邮箱都不怎么用，拥有网站的人的比例就更少了。</p>
<p>所以作为一个中文站。还是把评论框里的网站之类的框框删掉好了。电子邮件可以暂时保留，以后如果觉得没必要可以再删。另外WordPress默认给评论区的配字是“Leave a Reply” 这个也可以顺便改了。</p>
<hr />
<h2><strong>具体步骤是这样滴：</strong></h2>
<hr />
<h3><span style="color: #000000;"><strong>先把Leave a Reply改了：</strong></span></h3>
<p><strong><span style="color: #993300;">首先登陆后台，打开“<span style="color: #0000ff;">外观&#8211;编辑</span>” 在右边找到 <span style="color: #0000ff;">评论(comments.php)</span> 点它</span></strong></p>
<figure id="attachment_128" aria-describedby="caption-attachment-128" style="width: 1872px" class="wp-caption alignnone"><img fetchpriority="high" decoding="async" class="wp-image-128 size-full" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-2.58.01-PM-2.png" alt="点开评论之后的截图" width="1872" height="962" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-2.58.01-PM-2.png 1872w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-2.58.01-PM-2-300x154.png 300w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-2.58.01-PM-2-768x395.png 768w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-2.58.01-PM-2-1024x526.png 1024w" sizes="(max-width: 1872px) 100vw, 1872px" /><figcaption id="caption-attachment-128" class="wp-caption-text">点开评论之后的截图</figcaption></figure>
<p><strong><span style="color: #993300;">鼠标在内容里点一下，然后摁<span style="color: #0000ff;">command+F (Windows是control+F)</span>进行搜索。</span></strong></p>
<figure id="attachment_129" aria-describedby="caption-attachment-129" style="width: 1224px" class="wp-caption alignnone"><img decoding="async" class="wp-image-129 size-full" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.02.16-PM-2.png" alt="小搜索框截图" width="1224" height="478" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.02.16-PM-2.png 1224w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.02.16-PM-2-300x117.png 300w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.02.16-PM-2-768x300.png 768w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.02.16-PM-2-1024x400.png 1024w" sizes="(max-width: 1224px) 100vw, 1224px" /><figcaption id="caption-attachment-129" class="wp-caption-text">小搜索框截图</figcaption></figure>
<p>在上面那个小搜索框输入“Leave a Reply”（也可能是别的，这个主要看你用的主题默认的是什么。在自己发的文章里下滑到评论区看看它是怎么写的）然后点回车。</p>
<figure id="attachment_130" aria-describedby="caption-attachment-130" style="width: 2080px" class="wp-caption alignnone"><img decoding="async" class="wp-image-130 size-full" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.04.03-PM-2.png" alt="找到了的截图" width="2080" height="1198" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.04.03-PM-2.png 2080w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.04.03-PM-2-300x173.png 300w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.04.03-PM-2-768x442.png 768w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.04.03-PM-2-1024x590.png 1024w" sizes="(max-width: 2080px) 100vw, 2080px" /><figcaption id="caption-attachment-130" class="wp-caption-text">找到了的截图</figcaption></figure>
<p><strong><span style="color: #993300;">可以看到我们找到了呢！改成你喜欢的文字吧。。</span></strong></p>
<hr />
<h3><strong><span style="color: #000000;">下面开始把评论里的网站框神马的关掉：</span></strong></h3>
<p><strong><span style="color: #993300;">还是在“外观&#8211;编辑”右边的条条找到 模板函数(functions.php) 点它，打开</span></strong></p>
<figure id="attachment_132" aria-describedby="caption-attachment-132" style="width: 1624px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="wp-image-132 size-full" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.10.26-PM-2.png" alt="打开function截图" width="1624" height="948" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.10.26-PM-2.png 1624w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.10.26-PM-2-300x175.png 300w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.10.26-PM-2-768x448.png 768w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.10.26-PM-2-1024x598.png 1024w" sizes="(max-width: 1624px) 100vw, 1624px" /><figcaption id="caption-attachment-132" class="wp-caption-text">打开function截图</figcaption></figure>
<p>在最后添加这段代码</p>
<pre class="brush: php; title: ; notranslate">
//删除url
add_filter('comment_form_default_fields', 'mytheme_remove_url');
 
function mytheme_remove_url($arg) {
    $arg&#x5B;'url'] = '';
    return $arg;
}
//删除url完毕 i0oo0
</pre>
<figure id="attachment_133" aria-describedby="caption-attachment-133" style="width: 1276px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="wp-image-133 size-full" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.26.49-PM-2.png" alt="删除url完毕" width="1276" height="340" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.26.49-PM-2.png 1276w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.26.49-PM-2-300x80.png 300w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.26.49-PM-2-768x205.png 768w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.26.49-PM-2-1024x273.png 1024w" sizes="(max-width: 1276px) 100vw, 1276px" /><figcaption id="caption-attachment-133" class="wp-caption-text">删除url截图</figcaption></figure>
<p>当然愿意加个QQ也是可以的，虽然大家现在也不怎么用QQ了，</p>
<pre class="brush: php; title: ; notranslate">
//增加个QQ
function my_fields($fields) {
	$fields&#x5B;'qq'] = '

' . '&lt;label for=&quot;qq&quot;&gt;'.__('QQ').'&lt;/label&gt; ' .
	'&lt;input id=&quot;qq&quot; name=&quot;qq&quot; type=&quot;text&quot; value=&quot;' . esc_attr( $commenter&#x5B;'comment_qq'] ) . '&quot; size=&quot;30&quot; /&gt;

';
	return $fields;
}
add_filter('comment_form_default_fields','my_fields');
//增加个QQ完毕 i0oo0
</pre>
<figure id="attachment_134" aria-describedby="caption-attachment-134" style="width: 2006px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="wp-image-134 size-full" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.34.20-PM-2.png" alt="增加QQ截图" width="2006" height="360" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.34.20-PM-2.png 2006w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.34.20-PM-2-300x54.png 300w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.34.20-PM-2-768x138.png 768w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-21-at-3.34.20-PM-2-1024x184.png 1024w" sizes="(max-width: 2006px) 100vw, 2006px" /><figcaption id="caption-attachment-134" class="wp-caption-text">增加QQ截图</figcaption></figure>
<p><strong><span style="color: #993300;">这样网站的那个box就没了，QQ就可以有了。按照这个思路可以改其他东西。</span></strong></p>
<p><strong><span style="color: #993300;">姓名 邮箱 网址 分别是 author、email、url 修改key word就可以删除。</span></strong></p>
<p>&nbsp;</p>
<p>PS:我曾考虑要不要都删掉，就留一个评论框，匿名评论。但是这样想联系我的人也不能联系了。还是算了吧。</p>
<p>话说我们学校还给所有人都在学校服务器上开了10GB的个人空间，大家可以放自己的简历、资料，甚至如果愿意的话还可以放自己的网站。就是很棒！不过用的人不多，中国学生用这个功能的就更是凤毛麟角。等哪天我可以写一个教程，分享出来。</p>
<p>&nbsp;</p>
<p><a href="https://i0oo0.com/2019/02/21/wordpress%e4%bf%ae%e6%94%b9%e5%88%a0%e5%87%8f%e8%af%84%e8%ae%ba%e5%8c%ba/">WordPress修改删减评论区</a>最先出现在<a href="https://i0oo0.com">猪 i0oo0</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://i0oo0.com/2019/02/21/wordpress%e4%bf%ae%e6%94%b9%e5%88%a0%e5%87%8f%e8%af%84%e8%ae%ba%e5%8c%ba/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Feb.21 更换主题</title>
		<link>https://i0oo0.com/2019/02/21/feb-21-%e6%9b%b4%e6%8d%a2%e4%b8%bb%e9%a2%98/</link>
					<comments>https://i0oo0.com/2019/02/21/feb-21-%e6%9b%b4%e6%8d%a2%e4%b8%bb%e9%a2%98/#comments</comments>
		
		<dc:creator><![CDATA[大猪帆]]></dc:creator>
		<pubDate>Thu, 21 Feb 2019 20:25:12 +0000</pubDate>
				<category><![CDATA[日志]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[主题]]></category>
		<guid isPermaLink="false">https://i0oo0.com/?p=118</guid>

					<description><![CDATA[<p>				WordPress附带的2019主题实在是太不好用了。。就这他们还好意思往出宣传。。<br />
AMP没有任何优化，默认首页展示10篇文章，而且每篇都是原文展示，不能摘要。你当服务器和访客的设备都是谷歌吗？		</p>
<p><a href="https://i0oo0.com/2019/02/21/feb-21-%e6%9b%b4%e6%8d%a2%e4%b8%bb%e9%a2%98/">Feb.21 更换主题</a>最先出现在<a href="https://i0oo0.com">猪 i0oo0</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p style="text-align: center;">WordPress附带的2019主题实在是太不好用了。。就这他们还好意思往出宣传。。</p>
<p style="text-align: center;">AMP没有任何优化，默认首页展示10篇文章，而且每篇都是原文展示，不能摘要。你当服务器和访客的设备都是谷歌吗？</p>
<p style="text-align: center;">换了之前我的美剧视频网用过的主题，就是棒。</p>
<p style="text-align: center;">另外网站名字也稍微变了变，</p>
<p style="text-align: center;">从大猪变成了爱猪</p>
<p style="text-align: center;">更符合域名一点</p>
<p style="text-align: center;">而且“大猪”这个词在我看来有感情，具体原因可以看<a href="https://i0oo0.com/2019/02/18/hello-world/" target="_blank" rel="noopener noreferrer">开站文</a></p>
<p style="text-align: center;">但是在别人看来可能有点土味</p>
<p style="text-align: center;">另外其实网站还为此做了公众号，不过目前还没有开始运营，所以就不放二维码了</p>
<p>就酱		</p>
<p><a href="https://i0oo0.com/2019/02/21/feb-21-%e6%9b%b4%e6%8d%a2%e4%b8%bb%e9%a2%98/">Feb.21 更换主题</a>最先出现在<a href="https://i0oo0.com">猪 i0oo0</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://i0oo0.com/2019/02/21/feb-21-%e6%9b%b4%e6%8d%a2%e4%b8%bb%e9%a2%98/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>WordPress调整字体、大小、格式、颜色</title>
		<link>https://i0oo0.com/2019/02/20/wordpress%e8%b0%83%e6%95%b4%e5%ad%97%e4%bd%93%e3%80%81%e5%a4%a7%e5%b0%8f%e3%80%81%e6%a0%bc%e5%bc%8f%e3%80%81%e9%a2%9c%e8%89%b2/</link>
					<comments>https://i0oo0.com/2019/02/20/wordpress%e8%b0%83%e6%95%b4%e5%ad%97%e4%bd%93%e3%80%81%e5%a4%a7%e5%b0%8f%e3%80%81%e6%a0%bc%e5%bc%8f%e3%80%81%e9%a2%9c%e8%89%b2/#respond</comments>
		
		<dc:creator><![CDATA[大猪帆]]></dc:creator>
		<pubDate>Thu, 21 Feb 2019 01:45:00 +0000</pubDate>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[字体]]></category>
		<guid isPermaLink="false">https://i0oo0.com/?p=83</guid>

					<description><![CDATA[<p>				Wordpress调整字体、大小、格式、背景颜色等等的小教程。其实WordPress都是有这些功能的，只不过默认隐藏。我们要做的就是告诉它我们想显示它。改完之后就像微软的Office一样了呢。开心！		</p>
<p><a href="https://i0oo0.com/2019/02/20/wordpress%e8%b0%83%e6%95%b4%e5%ad%97%e4%bd%93%e3%80%81%e5%a4%a7%e5%b0%8f%e3%80%81%e6%a0%bc%e5%bc%8f%e3%80%81%e9%a2%9c%e8%89%b2/">WordPress调整字体、大小、格式、颜色</a>最先出现在<a href="https://i0oo0.com">猪 i0oo0</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>其实WordPress都是有这些功能的，只不过默认隐藏。我们要做的就是告诉它我们想显示它。</p>
<p>首先。在管理员界面点击<strong><span style="color: #0000ff;">外观-编辑</span></strong></p>
<figure id="attachment_87" aria-describedby="caption-attachment-87" style="width: 342px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="wp-image-87 size-full" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-20-at-7.19.01-PM-2.png" alt="外观--编辑" width="342" height="400" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-20-at-7.19.01-PM-2.png 342w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-20-at-7.19.01-PM-2-257x300.png 257w" sizes="(max-width: 342px) 100vw, 342px" /><figcaption id="caption-attachment-87" class="wp-caption-text">外观&#8211;编辑</figcaption></figure>
<p>然后在右边选择<strong><span style="color: #0000ff;">模板函数(functions.php)</span></strong><span style="color: #0000ff;"><span style="color: #000000;">滑到最下面输入</span></span></p>
<pre class="brush: php; title: ; notranslate">/*
 * 让你可以选择字体 以及大小 以及颜色 就像Office那样。
 */
function add_editor_buttons($buttons) {
$buttons&#x5B;] = 'fontselect';
$buttons&#x5B;] = 'fontsizeselect';
$buttons&#x5B;] = 'backcolor';
$buttons&#x5B;] = 'underline';
$buttons&#x5B;] = 'hr';
$buttons&#x5B;] = 'sub';
$buttons&#x5B;] = 'sup';
$buttons&#x5B;] = 'cut';
$buttons&#x5B;] = 'copy';
$buttons&#x5B;] = 'paste';
$buttons&#x5B;] = 'cleanup';
$buttons&#x5B;] = 'wp_page';
$buttons&#x5B;] = 'newdocument';
return $buttons;
}
add_filter(&quot;mce_buttons_3&quot;, &quot;add_editor_buttons&quot;);
/*
 * 完毕 i0oo0
 */</pre>
<p>输入完记得点保存。就再返回写文章界面看</p>
<figure id="attachment_91" aria-describedby="caption-attachment-91" style="width: 640px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="wp-image-91 size-large" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-20-at-7.45.23-PM-2-1024x143.png" alt="字体修改后效果" width="640" height="89" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-20-at-7.45.23-PM-2-1024x143.png 1024w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-20-at-7.45.23-PM-2-300x42.png 300w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-20-at-7.45.23-PM-2-768x107.png 768w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-20-at-7.45.23-PM-2.png 1186w" sizes="(max-width: 640px) 100vw, 640px" /><figcaption id="caption-attachment-91" class="wp-caption-text">字体修改后效果</figcaption></figure>
<p>复制 粘贴 下划线 字体 字号 颜色 一应俱全。</p>
<p>改完之后就像微软的Office一样了呢。开心！</p>
<p>开熏！</p>
<p><a href="https://i0oo0.com/2019/02/20/wordpress%e8%b0%83%e6%95%b4%e5%ad%97%e4%bd%93%e3%80%81%e5%a4%a7%e5%b0%8f%e3%80%81%e6%a0%bc%e5%bc%8f%e3%80%81%e9%a2%9c%e8%89%b2/">WordPress调整字体、大小、格式、颜色</a>最先出现在<a href="https://i0oo0.com">猪 i0oo0</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://i0oo0.com/2019/02/20/wordpress%e8%b0%83%e6%95%b4%e5%ad%97%e4%bd%93%e3%80%81%e5%a4%a7%e5%b0%8f%e3%80%81%e6%a0%bc%e5%bc%8f%e3%80%81%e9%a2%9c%e8%89%b2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>WordPress将两张图片并排（待改进）</title>
		<link>https://i0oo0.com/2019/02/19/wordpress%e5%b0%86%e4%b8%a4%e5%bc%a0%e5%9b%be%e7%89%87%e5%b9%b6%e6%8e%92/</link>
					<comments>https://i0oo0.com/2019/02/19/wordpress%e5%b0%86%e4%b8%a4%e5%bc%a0%e5%9b%be%e7%89%87%e5%b9%b6%e6%8e%92/#comments</comments>
		
		<dc:creator><![CDATA[大猪帆]]></dc:creator>
		<pubDate>Tue, 19 Feb 2019 22:32:30 +0000</pubDate>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[修复]]></category>
		<category><![CDATA[图片]]></category>
		<category><![CDATA[编辑]]></category>
		<guid isPermaLink="false">https://i0oo0.com/?p=42</guid>

					<description><![CDATA[<p>				在刚才写WordPress中文用户名报错的时候最后加了两张图片。图片很小，可是WordPress并没有把它们放在同一行。这就很让人受不了啊喂。。。我还用的是目前最新版5.0.3 不知道以后WordPress会不会改改排版。<br />
这里用两张小表情包图片当做例子。		</p>
<p><a href="https://i0oo0.com/2019/02/19/wordpress%e5%b0%86%e4%b8%a4%e5%bc%a0%e5%9b%be%e7%89%87%e5%b9%b6%e6%8e%92/">WordPress将两张图片并排（待改进）</a>最先出现在<a href="https://i0oo0.com">猪 i0oo0</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p><span style="color: #333333;">问题并没有完美彻底解决，如果谁有好的方法可以告诉我，蟹蟹</span></p>
<hr />
<p>在刚才写<a href="https://i0oo0.com/2019/02/19/wordpress%e4%b8%ad%e6%96%87%e7%94%a8%e6%88%b7%e5%90%8d%e6%8a%a5%e9%94%99/" target="_blank" rel="noopener noreferrer">WordPress中文用户名报错</a>的时候最后加了两张图片。图片很小，可是WordPress并没有把它们放在同一行。这就很让人受不了啊喂。。。我还用的是目前最新版5.0.3 不知道以后WordPress会不会改改排版。<br />
这里用两张小表情包图片当做例子。</p>
<p><span style="color: #993300;">首先是一开始插入的时候默认的排版，可以看到两个图片并没有挨在一起：</span></p>
<figure id="attachment_43" aria-describedby="caption-attachment-43" style="width: 240px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="wp-image-43 size-full" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.51.29-PM-2.png" alt="暗中观察 表情包" width="240" height="242" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.51.29-PM-2.png 240w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.51.29-PM-2-150x150.png 150w" sizes="(max-width: 240px) 100vw, 240px" /><figcaption id="caption-attachment-43" class="wp-caption-text">暗中观察</figcaption></figure>
<figure id="attachment_44" aria-describedby="caption-attachment-44" style="width: 244px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="wp-image-44 size-full" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.51.58-PM-2.png" alt="给我五块钱 表情包" width="244" height="242" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.51.58-PM-2.png 244w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.51.58-PM-2-150x150.png 150w" sizes="(max-width: 244px) 100vw, 244px" /><figcaption id="caption-attachment-44" class="wp-caption-text">Give Me Five</figcaption></figure>
<p><span style="color: #993300;">然后我们让第一张图片靠最左 第二张图片居中：</span></p>
<figure id="attachment_43" aria-describedby="caption-attachment-43" style="width: 240px" class="wp-caption alignleft"><img loading="lazy" decoding="async" class="wp-image-43 size-full" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.51.29-PM-2.png" alt="暗中观察 表情包" width="240" height="242" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.51.29-PM-2.png 240w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.51.29-PM-2-150x150.png 150w" sizes="(max-width: 240px) 100vw, 240px" /><figcaption id="caption-attachment-43" class="wp-caption-text">暗中观察</figcaption></figure>
<figure id="attachment_44" aria-describedby="caption-attachment-44" style="width: 244px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="wp-image-44 size-full" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.51.58-PM-2.png" alt="给我五块钱 表情包" width="244" height="242" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.51.58-PM-2.png 244w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.51.58-PM-2-150x150.png 150w" sizes="(max-width: 244px) 100vw, 244px" /><figcaption id="caption-attachment-44" class="wp-caption-text">Give Me Five</figcaption></figure>
<p><span style="color: #993300;">编辑页面倒是可以了，但是发布之后还是不在同一行。这操作，实在佩服。</span></p>
<p>这里要强调一下：WordPress还不是所有html code都接受，敲了代码试图修改一下，结果还竟然被WordPress直接删掉了。。。<br />
最后终于有一行代码没有被残忍地抹掉。而且虽然效果很难看，但是好歹也将就算是在同一行。做法是：</p>
<p>第一张图片<span style="color: #ff0000;">靠左</span>，第二章图片<span style="color: #ff0000;">靠中间</span>，然后在切换到“文本”视图（我强制用了旧版编辑器，新版编辑器好像叫“代码模式”？）<span style="color: #ff0000;">编辑源代码</span>，在两个图片中间加入<span style="color: #ff0000;">&lt;div style=&#8221;float: left;&#8221;&gt;</span>这段代码。然后在第二张图片后面加入<span style="color: #ff0000;">&lt;/div&gt;</span> 其目的就是让第二张图片靠左 靠左 靠左！</p>
<figure id="attachment_58" aria-describedby="caption-attachment-58" style="width: 640px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="wp-image-58 size-large" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-4.26.39-PM-2-1024x179.png" alt="图片近乎平行的代码 截图" width="640" height="112" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-4.26.39-PM-2-1024x179.png 1024w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-4.26.39-PM-2-300x52.png 300w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-4.26.39-PM-2-768x134.png 768w" sizes="(max-width: 640px) 100vw, 640px" /><figcaption id="caption-attachment-58" class="wp-caption-text">图片近乎平行的代码</figcaption></figure>
<figure id="attachment_43" aria-describedby="caption-attachment-43" style="width: 240px" class="wp-caption alignleft"><img loading="lazy" decoding="async" class="wp-image-43 size-full" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.51.29-PM-2.png" alt="暗中观察 表情包" width="240" height="242" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.51.29-PM-2.png 240w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.51.29-PM-2-150x150.png 150w" sizes="(max-width: 240px) 100vw, 240px" /><figcaption id="caption-attachment-43" class="wp-caption-text">暗中观察</figcaption></figure>
<div style="float: left;">
<figure id="attachment_44" aria-describedby="caption-attachment-44" style="width: 244px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="wp-image-44 size-full" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.51.58-PM-2.png" alt="给我五块钱 表情包" width="244" height="242" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.51.58-PM-2.png 244w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.51.58-PM-2-150x150.png 150w" sizes="(max-width: 244px) 100vw, 244px" /><figcaption id="caption-attachment-44" class="wp-caption-text">Give Me Five</figcaption></figure>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="text-align: left;">通过上面可以看到发布之后虽然第二张图片没有特别靠左，但是它也算和第一张图片<span style="color: #0000ff;">几乎</span>在一条线上了。不过并不是挨着，也不是平行（另外你可能需要多摁几下回车让文字可以靠下。）。小生才疏学浅，只能做到这个地步。自愧不如。（感觉满满都是bug T_T）</p>
<p>要滚去吃饭了，就酱</p>
<p><a href="https://i0oo0.com/2019/02/19/wordpress%e5%b0%86%e4%b8%a4%e5%bc%a0%e5%9b%be%e7%89%87%e5%b9%b6%e6%8e%92/">WordPress将两张图片并排（待改进）</a>最先出现在<a href="https://i0oo0.com">猪 i0oo0</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://i0oo0.com/2019/02/19/wordpress%e5%b0%86%e4%b8%a4%e5%bc%a0%e5%9b%be%e7%89%87%e5%b9%b6%e6%8e%92/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>WordPress中文用户名报错</title>
		<link>https://i0oo0.com/2019/02/19/wordpress%e4%b8%ad%e6%96%87%e7%94%a8%e6%88%b7%e5%90%8d%e6%8a%a5%e9%94%99/</link>
					<comments>https://i0oo0.com/2019/02/19/wordpress%e4%b8%ad%e6%96%87%e7%94%a8%e6%88%b7%e5%90%8d%e6%8a%a5%e9%94%99/#respond</comments>
		
		<dc:creator><![CDATA[大猪帆]]></dc:creator>
		<pubDate>Tue, 19 Feb 2019 21:25:18 +0000</pubDate>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[报错]]></category>
		<category><![CDATA[注册]]></category>
		<category><![CDATA[用户名]]></category>
		<guid isPermaLink="false">https://i0oo0.com/?p=10</guid>

					<description><![CDATA[<p>				可是WordPress默认会认定除了英文字母、数字和标点之外的用户名都是不规范的。所以并不会允许注册。会告诉你“错误：此用户名包含无效字符，请输入有效的用户名。”<br />
已经存在的中文名，在修改资料的时候也会发生问题：WordPress会对中文视而不见，它会认为你的用户名是空的，告诉你“不能创建登录名为空的用户。”		</p>
<p><a href="https://i0oo0.com/2019/02/19/wordpress%e4%b8%ad%e6%96%87%e7%94%a8%e6%88%b7%e5%90%8d%e6%8a%a5%e9%94%99/">WordPress中文用户名报错</a>最先出现在<a href="https://i0oo0.com">猪 i0oo0</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>				在安装WordPress的时候，管理员用户名选择了中文。这样做可以防止有坏人暴力破解密码，例如当用户名设置为Admin或Administrator之类默认的时候，基本会成为低成本黑客的众矢之的。基本操作就是他们手里大概有成千上万的IP号，有可能是买的IP号，也有可能是用病毒污染防御力低的电脑进而控制它们、不过大部分是通过VPN、http代理等不断改变IP。然后他们用这些IP号去不断尝试密码，一个IP号可能试3次就会被暂时冻结，不过黑客可以源源不断的轮流换IP去试，就很危险。但是如果黑客不知道你的用户名，那他就需要先试你的用户名，例如Jack、Lily之类常用的名字。这个时候如果选一个中文用户名就会大大增加破解的难度，有了用户名还要从头开始试密码，低成本黑客八成就会望而却步。i0oo0</p>
<p>可是WordPress默认会认定除了<span style="color: #3366ff;">英文字母</span>、<span style="color: #3366ff;">数字</span>和<span style="color: #3366ff;">标点</span>之外的用户名都是<span style="color: #ff0000;">不规范</span>的。所以并不会允许注册。会告诉你“错误：此用户名包含无效字符，请输入有效的用户名。”</p>
<figure id="attachment_11" aria-describedby="caption-attachment-11" style="width: 259px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="wp-image-11 size-medium" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.34.46-PM-2-259x300.png" alt="中文用户名报错截图" width="259" height="300" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.34.46-PM-2-259x300.png 259w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.34.46-PM-2.png 684w" sizes="(max-width: 259px) 100vw, 259px" /><figcaption id="caption-attachment-11" class="wp-caption-text">中文用户名报错</figcaption></figure>
<p>已经存在的中文名，在修改资料的时候也会发生问题：WordPress会对中文视而不见，它会认为你的用户名是空的，告诉你“不能创建登录名为空的用户。”</p>
<figure id="attachment_12" aria-describedby="caption-attachment-12" style="width: 300px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-medium wp-image-12" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.39.04-PM-2-300x179.png" alt="用户名为空错误的截图" width="300" height="179" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.39.04-PM-2-300x179.png 300w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.39.04-PM-2.png 530w" sizes="(max-width: 300px) 100vw, 300px" /><figcaption id="caption-attachment-12" class="wp-caption-text">“用户名为空”错误</figcaption></figure>
<h4><span style="color: #008000;">解决方法是：</span></h4>
<p>打开你的博客对应的文件目录，可以是在线文件管理，也可以通过FTP或者SFTP等途径连接到服务器。在博客目录下打开<span style="color: #ff0000;"><strong>wp-includes</strong></span>那个文件夹，找到<span style="color: #ff0000;"><strong>formatting.php</strong></span>这个文件然后编辑它，摁下command+F (Windows应该是control+F)进行搜索，找到<span style="color: #ff0000;"><strong>function sanitize_user( $username, $strict = false ) {</strong></span> 这一行，然后再下面紧挨着写一句指令<strong><span style="color: #ff0000;">$strict = false;</span></strong> （意思就是让WordPress不要太严肃嘛，任何用户名都是欢迎滴）然后保存就可以了。</p>
<figure id="attachment_13" aria-describedby="caption-attachment-13" style="width: 640px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="wp-image-13 size-large" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.56.42-PM-2-1024x340.png" alt="添加代码后的截图" width="640" height="213" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.56.42-PM-2-1024x340.png 1024w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.56.42-PM-2-300x100.png 300w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.56.42-PM-2-768x255.png 768w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.56.42-PM-2.png 1254w" sizes="(max-width: 640px) 100vw, 640px" /><figcaption id="caption-attachment-13" class="wp-caption-text">添加代码的截图</figcaption></figure>
<p>从此之后，注册用户名，修改资料，就都可以使用中文用户名了</p>
<div style="float: left;">
<figure id="attachment_14" aria-describedby="caption-attachment-14" style="width: 300px" class="wp-caption alignleft"><img loading="lazy" decoding="async" class="size-medium wp-image-14" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.59.46-PM-2-300x182.png" alt="资料修改成功截图" width="300" height="182" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.59.46-PM-2-300x182.png 300w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-2.59.46-PM-2.png 304w" sizes="(max-width: 300px) 100vw, 300px" /><figcaption id="caption-attachment-14" class="wp-caption-text">个人资料修改成功</figcaption></figure>
<div style="float: left;">
<figure id="attachment_15" aria-describedby="caption-attachment-15" style="width: 300px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-medium wp-image-15" src="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.00.40-PM-2-300x280.png" alt="中文用户名注册成功截图" width="300" height="280" srcset="https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.00.40-PM-2-300x280.png 300w, https://i0oo0.com/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-3.00.40-PM-2.png 738w" sizes="(max-width: 300px) 100vw, 300px" /><figcaption id="caption-attachment-15" class="wp-caption-text">中文用户名注册成功</figcaption></figure>
</div>
<p>就酱。</p>
</div>
<p><a href="https://i0oo0.com/2019/02/19/wordpress%e4%b8%ad%e6%96%87%e7%94%a8%e6%88%b7%e5%90%8d%e6%8a%a5%e9%94%99/">WordPress中文用户名报错</a>最先出现在<a href="https://i0oo0.com">猪 i0oo0</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://i0oo0.com/2019/02/19/wordpress%e4%b8%ad%e6%96%87%e7%94%a8%e6%88%b7%e5%90%8d%e6%8a%a5%e9%94%99/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
