<?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>运达&#039;s  blog &#187; WordPress</title>
	<atom:link href="https://www.yunda51.com/?feed=rss2&#038;tag=wordpress" rel="self" type="application/rss+xml" />
	<link>https://www.yunda51.com</link>
	<description>运达的博客</description>
	<lastBuildDate>Wed, 12 Nov 2025 07:58:26 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.0.19</generator>
	<item>
		<title>Google Fonts导致WordPress 速度问题</title>
		<link>https://www.yunda51.com/?p=1337</link>
		<comments>https://www.yunda51.com/?p=1337#comments</comments>
		<pubDate>Fri, 20 Jun 2014 10:59:32 +0000</pubDate>
		<dc:creator><![CDATA[运达]]></dc:creator>
				<category><![CDATA[php技术]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Google Fonts]]></category>

		<guid isPermaLink="false">http://www.yunda51.com/?p=1337</guid>
		<description><![CDATA[最近下载的wordpress3.9版本,安装之后特别慢,最后发现是Google Fonts导致的,真让人蛋疼.<a href="https://www.yunda51.com/?p=1337" class="read-more">Continue Reading</a>]]></description>
				<content:encoded><![CDATA[<p>最近下载的wordpress3.9版本,安装之后特别慢,最后发现是Google Fonts导致的,真让人蛋疼.<br />
<strong>Google Fonts导致WordPress 速度问题之原因</strong><br />
WordPress 自3.8+版本后加入了Google Fonts（别问我Google Fonts是什么了），然后捏，因为近期敏感周期（35号），天朝发威，谷歌的一系列网站被彻底墙，包括Google Fonts 所在的googleapis.com 。所以，如果是在登陆状态下打开你的WordPress 站点，会非常慢，因为压根儿加载不了这个字体文件。如果是非登陆状态且你的主题不是老外的主题，一般来说都是正常的。</p>
<p><strong>解决方法</strong><br />
出来问题就要解决，在天朝，既然你不得不忍受之，那么就换个思路变通一下。下面的解决方法，思路一是禁止加载该Google Fonts，二是替换加载源。下面说明之：</p>
<p><strong>方法一：</strong>【插件】禁止WordPress 后台加载Google Fonts</p>
<p>安装启用 Disable Google Fonts 或者 Remove Open Sans font Link from WP core 其中之一即可。没啥好说的。</p>
<p><strong>方法二：</strong>【代码】直接在functions.php 文件添加代码</p>
<p>网络上有不少代码，下面可以参考下，具体有没有效果没有确认：</p>
<pre class="wp-code-highlight prettyprint">
add_filter(&#039;gettext_with_context&#039;, &#039;disable_open_sans&#039;, 888, 4 );
      function disable_open_sans( $translations, $text, $context, $domain ){
             if ( &#039;Open Sans font: on or off&#039; == $context &amp;&amp; &#039;on&#039; == $text ) {
             $translations = &#039;off&#039;;}return $translations;} 
      function dw_remove_open_sans() {      
            wp_deregister_style( &#039;open-sans&#039; );          
            wp_register_style( &#039;open-sans&#039;, false );         
            wp_enqueue_style(&#039;open-sans&#039;,&#039;&#039;);      } 
            add_action( &#039;init&#039;, &#039;dw_remove_open_sans&#039; );
</pre>
<p>方法三：【代码】替换open sans 字体的加载源</p>
<p>打开wordpress代码中的文件wp-includes/script-loader.php文件，搜索：fonts.googleapis.com 找到这行代码：</p>
<p>$open_sans_font_url = "//fonts.googleapis.com/css?family1=Open+Sans:300italic,400italic,600italic,300,400,600&#038;subset=$subsets";</p>
<p>把fonts.googleapis.com替换为fonts.useso.com。<br />
转载请注明转自:<a href="http://www.yunda51.com">运达's blog</a>  原文地址：<a href="http://www.yunda51.com/1337.html">http://www.yunda51.com/1337.html</a></p>
]]></content:encoded>
			<wfw:commentRss>https://www.yunda51.com/?feed=rss2&#038;p=1337</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>如何实现wordpress二级分类目录（页面）导航</title>
		<link>https://www.yunda51.com/?p=875</link>
		<comments>https://www.yunda51.com/?p=875#comments</comments>
		<pubDate>Wed, 17 Apr 2013 08:55:24 +0000</pubDate>
		<dc:creator><![CDATA[运达]]></dc:creator>
				<category><![CDATA[php技术]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.yunda51.com/?p=875</guid>
		<description><![CDATA[最近用wp做网站，发现一个问题，大部分主题都可以在菜单下添加二级分类目录页面导航，但是有的主题即使在菜单下添加<a href="https://www.yunda51.com/?p=875" class="read-more">Continue Reading</a>]]></description>
				<content:encoded><![CDATA[<p>最近用wp做网站，发现一个问题，大部分主题都可以在菜单下添加二级分类目录页面导航，但是有的主题即使在菜单下添加添加了，仍然在前台页面也无法显示二级目录，那么就需要咱们去想办法解决了，实现这个功能要用到两个函数。<br />
<strong>首先应该把如下代码放到header.php里面：</strong></p>
<div class="buy shortcodestyle">
&lt;!--添加显示二级导航菜单--&gt;<br />
&lt;!-- 页面导航菜单 START --&gt;<br />
&lt;!--&lt;div id="menu"&gt;<br />
&lt;div class="menub"&gt;<br />
&lt;ul&gt;<br />
&lt;li&lt;?php if (is_home()) { echo ' class="current-cat"';} ?&gt;&gt;&lt;a title="&lt;?php _e('Home', 'default'); ?&gt;" href="&lt;?php echo get_settings('home'); ?&gt;/"&gt;&lt;?php _e('Home', 'default'); ?&gt;&lt;/a&gt;&lt;/li&gt;<br />
&lt;?php<br />
$currentcategory = '';<br />
// 以下这行代码用于在导航栏添加分类列表，<br />
if (!is_page() &amp;&amp; !is_home()) {<br />
$catsy = get_the_category();<br />
$myCat = $catsy[0]-&gt;cat_ID;<br />
$currentcategory = '&amp;current_category='.$myCat;<br />
}<br />
wp_list_categories('depth=2&amp;title_li=&amp;show_count=0&amp;hide_empty=0'.$currentcategory);</p>
<p>// 以下这行代码用于在导航栏添加页面列表<br />
wp_list_pages('depth=2&amp;title_li=&amp;sort_column=menu_order');<br />
?&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;--&gt;<br />
&lt;!-- 页面导航菜单 END --&gt;
</p></div>
<p><strong>然后就是CSS来设置这个menub了</strong></p>
<div class="buy shortcodestyle">
/*菜单导航二级目录*/<br />
#menu{width:960px;margin:10px auto 0px;border:1px #aaa;-webkit-box-shadow:#ccc 0 0 5px;-moz-box-shadow:#CCC 0 0 5px;box-shadow:#CCC 0 0 5px;background:#FFF;height:35px}  </p>
<p> /*#menu{width:960px;margin:10px auto 0px;border:1px solid #aaa;-webkit-box-shadow:#ccc 0 0 5px;-moz-box-shadow:#CCC 0 0 5px;box-shadow:#CCC 0 0 5px;background:#FFF;height:35px}*/  </p>
<p> #footer{width:960px;margin:30px auto 10px;border:1px solid #aaa;-webkit-box-shadow:#CCC 0 0 5px;-moz-box-shadow:#CCC 0 0 5px;box-shadow:#CCC 0 0 5px;background:#FFF;height:35px}  </p>
<p> #menu ul li,#footer ul li{float:left;text-align:center;min-width:57px}  </p>
<p> #menu ul li a,#footer ul li a{font-size:14px;display:block;padding:7px 14px;white-space:nowrap}  </p>
<p> #menu ul li:hover a,#footer ul li:hover a{transform:rotate(6deg);-webkit-transform:rotate(6deg);-moz-transform:rotate(6deg);-o-transform:rotate(6deg)}  </p>
<p> #menu ul li:hover,#footer ul li:hover{background:#f2f2f2;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}  </p>
<p> #menu ul li.current-cat a,.current_page_item a{color:#1ba1e2}  </p>
<p> .menub{font-size:12px;position:relative;z-index:100;}  </p>
<p> .menub ul{list-style:none;}  </p>
<p> .menub li {float:left;position:relative;}  </p>
<p> .menub ul ul {visibility:hidden;position:absolute;}  </p>
<p> .menub table {position:absolute; top:0; left:0;}  </p>
<p> .menub ul li:hover ul,  </p>
<p> .menub ul a:hover ul{visibility:visible;}  </p>
<p> .menub a{display:block;background:#ffffff;padding:0px;margin:0px;color:#777777;text-decoration:none;}  </p>
<p> .menub a:hover{background:#f2f2f2;color:#f09609;}  </p>
<p> .menub ul ul{}  </p>
<p> .menub ul ul li {clear:both;text-align:left;font-size:12px;}  </p>
<p> .menub ul ul li a{display:block;width:100px;height:13px;margin:0;border-bottom:1px solid #000000;}  </p>
<p> .menub ul ul li a:hover{border:0;background:#bce27f;}
</p></div>
<p>转载请注明转自:<a href="http://www.yunda51.com">运达's blog</a>  原文地址：<a href="http://www.yunda51.com/875.html">http://www.yunda51.com/875.html</a></p>
]]></content:encoded>
			<wfw:commentRss>https://www.yunda51.com/?feed=rss2&#038;p=875</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>WordPress设置文章页面的动态关键字和描述</title>
		<link>https://www.yunda51.com/?p=758</link>
		<comments>https://www.yunda51.com/?p=758#comments</comments>
		<pubDate>Mon, 14 Jan 2013 16:28:43 +0000</pubDate>
		<dc:creator><![CDATA[运达]]></dc:creator>
				<category><![CDATA[php技术]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.yunda51.com/?p=758</guid>
		<description><![CDATA[闲着没事用Wp给朋友做了个企业站，经过一番苦战网站终于上线了，在添加关键字和描述的时候发现这个主题后台竟然没有<a href="https://www.yunda51.com/?p=758" class="read-more">Continue Reading</a>]]></description>
				<content:encoded><![CDATA[<p>闲着没事用Wp给朋友做了个企业站，经过一番苦战网站终于上线了，在添加关键字和描述的时候发现这个主题后台竟然没有地方添加，添加关键字和描述更利于网站的收录！好吧，只能自己想办法了，于是乎，这篇文章就诞生啦！</p>
<p>其实很简单，如果你设置了网站关键字和描述的话（手动添加），我已经把代码整理好了</p>
<div class="task shortcodestyle"><strong>首先：</strong>打开直接修改源文件（header.php），或者你可以登录后台修改：外观-编辑-选择修改（顶部）header.php文件。<br />
<strong>找到如下代码：</strong><br />
把&lt;meta name="keywords" content="这里是你网站首页的关键字" /&gt;替换为：</p>
<p>&lt;meta name="keywords" content="&lt;?php if (is_single()){ $keywords = "";$tags = wp_get_post_tags($post-&gt;ID);foreach ($tags as $tag ) {$keywords = $keywords . $tag-&gt;name . ", ";}echo $keywords;}else{echo ("在这里是填写你网站首页的关键字");} ?&gt;" /&gt;</p>
<p><strong>找到如下代码：</strong></p>
<p>把&lt;meta name="description" content="这里是你网站首页的描述" /&gt;</p>
<p>替换为：</p>
<p>&lt;meta name="description" content="&lt;?php if (is_single()){ echo mb_strimwidth(strip_tags(apply_filters('the_content', $post-&gt;post_content)), 0, 180,"");} else{echo ("在这里是填写你网站首页的描述");}?&gt;" /&gt;<br />
<strong>然后：</strong>点击“更新文件”保存设置，这样就Ok了！</p>
</div>
<p>转载请注明转自:<a href="http://www.yunda51.com">运达's blog</a>  原文地址：<a href="http://www.yunda51.com/758.html">http://www.yunda51.com/758.html</a></p>
]]></content:encoded>
			<wfw:commentRss>https://www.yunda51.com/?feed=rss2&#038;p=758</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
		<item>
		<title>WordPress主题制作如何添加小工具功能</title>
		<link>https://www.yunda51.com/?p=471</link>
		<comments>https://www.yunda51.com/?p=471#comments</comments>
		<pubDate>Mon, 10 Dec 2012 05:29:46 +0000</pubDate>
		<dc:creator><![CDATA[运达]]></dc:creator>
				<category><![CDATA[php技术]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.yunda51.com/?p=471</guid>
		<description><![CDATA[第一步打开主题下面的functions文件，追加下面代码（注意：这代码是加在&#60;?php     这里 ?<a href="https://www.yunda51.com/?p=471" class="read-more">Continue Reading</a>]]></description>
				<content:encoded><![CDATA[<p>第一步打开主题下面的functions文件，追加下面代码（注意：这代码是加在&lt;?php     这里 ?&gt;千万不要在?&gt;的后面一定是前面哈）<br />
if ( function_exists('register_sidebar') )<br />
register_sidebar(array(<br />
'before_widget' =&gt; '&lt;div&gt;        ',<br />
'after_widget' =&gt; '&lt;/div&gt;',<br />
'before_title' =&gt; '&lt;h2&gt;',<br />
'after_title' =&gt; '&lt;/h2&gt;',<br />
));<br />
然后保存重新上传functions.php文件。<br />
第二步，打开sidebar.php，在最上面添加&lt;?php if ( !function_exists('dynamic_sidebar')<br />
|| !dynamic_sidebar() ) : ?&gt;<br />
然后在最下面添加&lt;?php endif; ?&gt;然后保存，重新上传sidebar.php。<br />
那么刷新一下后台，点击外观-小工具，就会显示出来了，这样就ok了~我刚才自己已经试过成功了，希望你们也能成功哈！</p>
<p>转载请注明转自:<a href="http://www.yunda51.com/">运达's blog</a>（原文地址： <a href="http://www.yunda51.com/?p=471">http://www.yunda51.com/?p=471</a>）</p>
]]></content:encoded>
			<wfw:commentRss>https://www.yunda51.com/?feed=rss2&#038;p=471</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>wordpress内页随机排序友情链接</title>
		<link>https://www.yunda51.com/?p=421</link>
		<comments>https://www.yunda51.com/?p=421#comments</comments>
		<pubDate>Thu, 06 Dec 2012 07:40:23 +0000</pubDate>
		<dc:creator><![CDATA[运达]]></dc:creator>
				<category><![CDATA[php技术]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.yunda51.com/?p=421</guid>
		<description><![CDATA[现在很多站内页的友情链接都是随机排序的，而有的站的友情链接是按名称排的，我感觉这样很不公平，在底下显示的站就会<a href="https://www.yunda51.com/?p=421" class="read-more">Continue Reading</a>]]></description>
				<content:encoded><![CDATA[<p>现在很多站内页的友情链接都是随机排序的，而有的站的友情链接是按名称排的，我感觉这样很不公平，在底下显示的站就会一直在底下显示，所以尝试改成随机排序显示友情链接！</p>
<p>我用的是loper主题，别的就不多说了，首先到主题文件里面去修改，找到links.php，在代码里面添加如下代码：</p>
<div class="yangshi">&lt;div&gt;&lt;?php wp_list_bookmarks('orderby=rand&amp;show_images=1'); ?&gt;&lt;/div&gt;</div>
<p>然后就是在style.css里面添加样式：</p>
<div class="yangshi1">.lists {padding: 5px; margin: 25px auto auto 0; text-align:center;}<br />
.lists ul{ margin:0px; padding:0px; list-style: none;  }<br />
.linkcat { ffont-size: 12px; font-weight: bolder; padding: 5px; margin-bottom: 15px; list-style: none; clear:both;}<br />
/*.lists li h2 {font-size:16px; margin-bottom: 15px; color: #99CC33; text-align:left;} */<br />
.lists li h2 {font-size:16px; margin-bottom: 15px; color: #323333; text-align:left;}<br />
.listcat ul {margin-left: 20px; list-style: none; color:}<br />
.linkcat ul li { font-family:"宋体"; font-weight:100; float: left; margin-bottom: 20px; margin-left: 18px; width: 120px; line-height:22px; border: 1px solid #d9d9d9; background-color:#fff;}<br />
.linkcat ul li a { width: 120px; color: #323333; text-decoration: none;}<br />
.linkcat ul li a:hover { width: 120px; display:block; background-color:#99CC33; text-decoration: none; color:#FFFFFF;}<br />
.linkcat ul li a img {margin-right: 3px;}<br />
.linkcat ul li a:visited {color: #323333;}<br />
.linkcat ul li a:hover { width: 120px; display:block; background-color:#99CC33; text-decoration: none; color:#FFFFFF;}<br />
.tips {font-size: 14px; margin-bottom: 18px; margin-left: 5px;}</div>
<p>这样就ok了！</p>
<p>转载请注明转自:<a href="http://www.yunda51.com/">运达's blog</a>（原文地址：<a href="http://www.yunda51.com/?p=421">http://www.yunda51.com/?p=421</a>）</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.yunda51.com/?feed=rss2&#038;p=421</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
