[wordpress插件] Category Post Shortcode类别发布简码

wordpress 插件 文章 2020-03-18 13:30 514 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

This plugin allow you to display post list in your page or post by using shortcode.

此插件可让您在页面中显示帖子列表或使用简码显示帖子。

    • Author: ibnuyahya
    • 作者:ibnuyahya

    • Author URI: http://www.ibnuyahya.com
    • 作者URI:http://www.ibnuyahya.com

    • Copyright: Released under GNU GENERAL PUBLIC LICENSE
    • 版权:根据GNU通用公共许可证发行

    How to use

    使用方法

    just put this shortcode in your post or pages

    只需将此简码放在您的帖子或页面中

    [cat totalposts=”3″ category=”1,3″ thumbnail=”true” excerpt=”true” ]

    [cat totalposts =” 3” category =” 1,3” thumbnail =“ true”摘录=” true”]

      • totalposts – your total number of post to display.

      • 总帖子数–您要显示的帖子总数。

        default is -1

      • 默认值为-1

      • category – category id.

      • 类别-类别ID。

        use comma , for multiple id

      • 使用逗号,以获取多个ID

      • thumbnail – set true if you want to display thumbnail.

      • 缩略图–如果要显示缩略图,则设置为true。

        default is false

      • 默认为false

      • date – set true if you want to display post date.

      • date –如果要显示发布日期,请设置为true。

        default is false.

        默认为false。

        Uses format set in WordPress Settings > General > Date Format

      • 使用在WordPress设置>常规>日期格式中设置的格式

      • excerpt – set true if you want to display excertp.

      • 摘录–如果要显示摘录,请设置为true。

        default is true

      • 默认为true

      • orderby – your post will order by .

      • orderby –您的帖子将以排序。

        default post_date .

        默认为post_date。

        check https://codex.wordpress.org/Template_Tags/get_posts for detail

      • 检查https://codex.wordpress.org/Template_Tags/get_posts了解详情

      thumbnail

      缩略图

      * create custom field key as thumbnail-url and put your thumbnail url in the value area

      *将自定义字段键创建为缩略图网址,并将您的缩略图网址放入值区域

      style at your own

      自己的风格

      * you need to style your category-post-shortcode plugin in your style.css example

      *您需要在style.css示例中为您的category-post-shortcode插件设置样式

      .cat-post{
          

      .cat-post {
          

      width:100%;

      宽度:100%;

      }

      }

      .cat-post-list{
          

      .cat-post-list {
          

      display: block;
          

      显示:块;
          

      margin-bottom: 20px;
          

      底边距:20px;
          

      position: relative;

      位置:相对;

      }

      }

      .cat-post-images{
          

      .cat-post-images {
          

      float:left;
          

      float:left;
          

      width:140px;
          

      宽度:140像素;
          

      display:block;

      display:block;

      }

      }

      .cat-content{
          

      .cat-content {
          

      width:350px;
          

      宽度:350像素;
          

      float:right;

      float:right;

      }

      }

      .cat-post-title{
          

      .cat-post-title {
          

      display: block;
          

      显示:块;
          

      width:100%;

      宽度:100%;

      }

      }

      .cat-post-date{
          

      .cat-post-date {
          

      display: block;
          

      显示:块;
          

      width:100%;

      宽度:100%;

      }

      }

      .cat-clear{
          

      .cat-clear {
          

      clear:both;

      清除:两者;

      }

      }

        1. more info or sample, please visit http://ibnuyahya.com/wordpress-plugins/category-post-shortcode
        2. 更多信息或示例,请访问http://ibnuyahya.com/wordpress-plugins/category-post-shortcode

安装步骤

Install like any other basic plugin:

与其他任何基本插件一样安装:

    1. Copy the category-post-shortcode folder to your /wp-content/plugins/ folder

      将category-post-shortcode文件夹复制到您的/ wp-content / plugins /文件夹中

    2. Activate the Category Post Shortcode on your plugin-page.

      在插件页面上激活“ Category Post Shortcode”。

下载地址
https://downloads.wordpress.org/plugin/category-post-shortcode.zip
-EOF-

AI助手支持GPT4.0