承接 trendwerk/post-type-order 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

trendwerk/post-type-order

Composer 安装命令:

composer require trendwerk/post-type-order

包简介

Order posts in any post type. Made for WordPress.

README 文档

README

Order posts in any post type. Made for WordPress.

Features

  • Allows admins to order posts from any post type in a separate "Order" menu
  • Automatically orders posts
  • Divide ordering by taxonomy

Installation

composer require trendwerk/post-type-order

Usage

Step 1

Add the post type support 'order' to any post type

'supports' => array( 'title', 'editor', 'revisions', 'order' )

Step 2 (optional)

You can divide the post type ordering by taxonomy

'supports'          => array( 'title', 'editor', 'revisions', 'order' ),
'order_by_taxonomy' => $taxonomy

If you want to use this, it's impossible to do automatic ordering. You will need to adjust the query manually. Below is an example of a custom loop. This is a little more complex, but I'm sure you'll figure it out.

$posts = new WP_Query( array(
	'post_type' => $post_type,
	'post__in'  => TP_Post_Type_Order::get_posts( $term, $taxonomy, $post_type ),
	'orderby'   => 'post__in'
) );

Step 3

Order up!

统计信息

  • 总下载量: 14.09k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2014-12-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固