<?php $posts = query_posts($query_string . '&orderby=date&showposts=15'); ?> 放在这个函数之前 <?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
.alignnone { margin: 5px 20px 20px 0; } .aligncenter, div.aligncenter { display: block; margin: 5px auto 5px auto; } .alignright { float:right; margin: 5px 0 20px 20px; } .ali…
<?php /** * WordPress 查询综合参考 * 编译:luetkemj - luetkemj.com * * 官方文档: http://codex.wordpress.org/Class_Reference/WP_Query * 源代码: http://core.trac.wordpress.org/browser/tags/3…
File: wp-includes/media.php function wp_get_attachment_image_src( $attachment_id, $size = 'thumbnail', $icon = false ) { // Get a thumbnail or intermediate image if there is o…
<?php $a=get_category_root_id(1); $args=array( 'orderby' => 'id', 'hide_empty' => "0", 'child_of' => $a,//可以换为:'child_of' => '1', // 这个参数是什么,还在确认。 ); $categories=get_catego…
<?php $categories = get_categories('child_of=1&depth=0&hide_empty=0&orderby=id&order=asc'); foreach ($categories as $category) { $now_cat = $category->term_…
导航调取二级分类和二级分类下的产品 <?php $categories = get_categories('child_of=2&depth=0&hide_empty=0'); foreach ($categories as $category) { $now_cat = $category->term_id; $cat_na…
Wordpress菜单函数wp_nav_menu各参数详解及示例 注册菜单 首先要注册菜单,将以下函数添加至function.php函数里 register_nav_menus(array( 'PrimaryMenu'=>'导航', 'friendlinks'=>'友情链接', 'footer_nav'=>'页脚导航')); add_theme_s…
wordpress 调取二级和二级下分类的方法 <?php wp_list_cats('sort_column=name&optioncount=0&hierarchical=1&hide_empty=0&child_of=1'); ?> 调取所有二级的方法 <?php $categories = get…
location /aijirenvial/ { index index.html index.htm index.php l.php; autoindex off; if (!-e $request_filename){ rewrite ^/aijirenvial/(.*)$ /aijirenvial/index.php/$1 last; } }