Quantcast
Channel: Peter Zhou的博客 »程序
Browsing latest articles
Browse All 6 View Live

让WordPress友情链接只在首页显示

通过is_home()函数,可以判断当前页面是否是首页,如果是首页,就执行,完整代码如下: < ?php if(is_home()) { ?> <div> <h4>友情链接</h4> <ul> < ?php wp_list_bookmarks(‘title_li=&categorize=0′); ?>...

View Article



How to Exclude A WordPress Category From Search Results

Insert the code to search.php after  <?php get_header(); ?> <?php $page = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; $s = get_query_var(‘s’);...

View Article

How to Exclude WordPress Pages From Search Results?

In short, just add this to your theme’s functions.php file (or create the file if it doesn’t exist): <?php function mySearchFilter($query) { if ($query->is_search) { $query->set(‘post_type’,...

View Article

SWF flash 右击菜单中加链接的代码

_lockroot = true; function PR(obj, item) { getURL(“http://www.zhoushibiao.com/”, “_blank”); } // End of the function Stage.scaleMode = “noScale”; myMenu = new ContextMenu(); myMenu.hideBuiltInItems();...

View Article

网站常用的一些东西

1. 屏蔽中文浏览器 JS版本: <script language=”javascript”> <!– var t=navigator.userLanguage if (t==”zh-cn” || t==”zh-tw” || t==”zh-hk” || t==”zh-mo”) { location.replace(“http://www.xxxx.cn/”); } else {...

View Article


Zennoposter Metal Power 使用笔记

1. 网页上get value/outertext等等时,当值为空时,会被认为执行完成并继续执行下一步。 如果从文件中拿一个值,当值为空时,会被认为执行失败而停止。 2. 填完表,点击submit后,一定要考虑到密码错误,captcha错误等情况,否则会因为找不到下一步的元素而执行失败。 3. 拿文件的那种,不要第一次拿就同时删掉原文件,而应该在文件的内容已经发布成功后再来删。 4....

View Article
Browsing latest articles
Browse All 6 View Live




Latest Images