09 2012 档案
摘要:wordpress获取相关文章的函数ByHELION|Published:2011 年 11 月 04 日Number of View: 52在文章页面,提供文章的ID即可获得此文章的相关文章,相关文章的原理主要是根据Tag相同来提取的,代码如下:请根据实际情况进行更改function srelated_posts($before_title="",$after_title="",$postID) { global $wpdb, $table_prefix; $now = current_time('mysql', 1); $tags =
阅读全文
摘要:在web开发中,经常会用到iframe,难免会碰到需要在父窗口中使用iframe中的元素、或者在iframe框架中使用父窗口的元素js在父窗口中获取iframe中的元素1、格式:window.frames["iframe的name值"].document.getElementByIdx_x("iframe中控件的ID").click();实例:window.frames["ifm"].document.getElementByIdx_x("btnOk").click();2、格式:var obj=document.
阅读全文
摘要:几个实用的WordPress主题函数使用技巧http://www.21say.com/wordpress-proposition-function/
阅读全文
摘要:content 和 sidebar理应长度不一致哥找了半天 找到一个随机自定义摘要长度 博文http://www.cnxsz.com/jzcx/blog/12697.htmlhttp://wp-snippets.com/dynamic-custom-length-excpert/在functions中添加/*控制摘要长度*/// Variable & intelligent excerpt length.function print_excerpt($length) { // Max excerpt length. Length is set in characters global
阅读全文
摘要:http://www.web589.com/posts/1140.htmlhttp://www.dev4press.com/2010/tutorials/wordpress/tips/get-posts-for-a-category/
阅读全文
摘要:http://messense.me/wp-comment-user-count.html
阅读全文
摘要:http://blicklamp.sinaapp.com/2011/08/21/wordpress-the_excerpt%E5%87%BD%E6%95%B0%E4%B8%AD%E6%96%87%E9%95%BF%E5%BA%A6%E9%97%AE%E9%A2%98/http://wiinder.com/wordpress-new-excerpt.html结合以上两篇博文 哥得出的中文摘要 无插件解决办法functions函数中添加function new_excerpt_length($length) { return 75;}add_filter('excerpt_length
阅读全文
摘要:http://bbs.denglu.cc/thread-3684-1-1.html
阅读全文
摘要:自定义栏目使用 在文章里面 没有的话在显示选项里面勾上 get_post_meta($post->ID,"thumbnail",true) 可以通过这个来调用 今天又学了一招。。。。
阅读全文
摘要:如何为WordPress主题增加特色图像调用WordPress新版本中增加了特色图像的功能,但只有主题支持时才会显示出这个功能 ,如何在主题中启用这个功能呢?1、在主题functions.php中加入if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' );}开启特色图像功能2、之后在模版主循环后面适合位置加入调用代码<?phpif(has_post_thumbnail()) { the_post_thumbnail();} else { e
阅读全文
摘要:http://zjuhpp.com/chinese-localization-of-business-wordpress-theme-devster.html
阅读全文
摘要:http://www.binarymoon.co.uk/demo/今天玩wordpress的时候碰到一个新东东, 可以裁减图片大小的。可以用来调整图片的大小,但是不知道怎么搞的只能小 不能大TimThumb 插件
阅读全文
摘要:addAttributeToFilter is a function that can be called on a product collection in Magento. In short, it adds a condition to the WHERE part of the MySQL query used to extract a product collection from the database.?1234$_products = Mage::getModel('catalog/product')->getCollection()->addA
阅读全文
摘要:Magento首页及分类页面侧边栏经常需要调用某一个分类下的产品,例如首页的Featured Product等。这些分类一般保持不激活状态,我们可以添加店铺中比较畅销的产品到该分类中,并从前台调用。下面一段代码主要用处就是在Magento中获取指定分类下的产品。$products= Mage::getModel('catalog/category')->load($category_id)->getProductCollection()->addAttributeToSelect('*')->addAttributeToFilter(
阅读全文
摘要:http://www.javabk.com/archieves/magento-change-admin-path/http://www.javabk.com/archieves/tag/magento/
阅读全文
浙公网安备 33010602011771号