wordpress
秋千Hope
这个作者很懒,什么都没留下…
展开
-
wordpress 避免the_content自带p标签和内容截取
即可 <?php echo wp_trim_words( get_the_title(),50);// 截取50字的文章标题 echo wp_trim_words( get_the_excerpt(),100);// 截取100字的文章摘要 echo wp_trim_words( get_the_content(),500);// 截取500字的文章内容 ?>原创 2016-05-19 16:06:00 · 1403 阅读 · 0 评论 -
WordPress 自定义文章类型(Post Type)终极指南
http://blog.wpjam.com/article/wordpress-post-type/ function my_custom_post_course() { $labels = array( 'name' => _x( 'course', 'post type 名称' ), 'singular_name'转载 2016-05-20 11:13:07 · 1607 阅读 · 0 评论