[wordpress插件] DobsonDev ShortcodesDobsonDev简码

wordpress 插件 文章 2020-04-20 16:11 426 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

A collection of helpful shortcodes that I use in my own work that I wanted to share with the WordPress Community.

我在自己的工作中使用的有用的短代码集合,希望与WordPress社区共享。

If you want to suggest any shortcodes please email me at alex@dobsondev.com.

如果您想建议任何简码,请通过 alex@dobsondev.com 给我发送电子邮件。

Please download from the Offical WordPress Repository for easiest installation.

请从官方WordPress信息库下载,以实现最简单的安装。

If you would like to donate please click here.

如果您想捐赠,请单击此处

As of version 2.0.0 DobsonDev Shortcodes includes a TinyMCE Plugin that provides a button and user interface for adding the shortcodes.

从2.0.0版开始,DobsonDev简码包含TinyMCE插件,该插件提供用于添加简码的按钮和用户界面。

The button is the DobsonDev Shortcodes logo and if you click on it you will see a dropdown menu with all of the different shortcodes available to you.

该按钮是DobsonDev短代码徽标,如果单击它,您将看到一个下拉菜单,其中提供了所有不同的短代码。

Click on the shortcode you want and a popup will appear (for the most part – three of the shortcodes just appear in the editor and you can fill their content in) containing the different attributes for that shortcode.

单击所需的简码,将出现一个弹出窗口(在大多数情况下,其中三个简码会出现在编辑器中,您可以填写其内容),其中包含该简码的不同属性。

The required attributes are marked with stars and you must fill them in. The other optional attributes can either be filled in to include them or left blank to leave them out.

必填属性用星号标记,您必须填写它们。其他可选属性可以填写以包括它们,也​​可以留空以将其忽略。

Shortcodes Included

包含的短代码

    • Embed PDFs – Embeds PDFs into pages rather than separate links.
    • 嵌入PDF –将PDF嵌入页面而不是单独的链接。

    • Embed GitHub Gists – Easily add GitHub gists to your site or blog.
    • 嵌入 GitHub Gists –轻松将GitHub gists添加到您的网站或博客。

    • Embed GitHub Repo Readme – Easily add the content from your GitHub repository README.md file.
    • 嵌入 GitHub Repo自述文件 –轻松添加GitHub存储库README.md文件中的内容。

    • Embed GitHub Repo File Contents – Easily add the content from a file from any GitHub repository.
    • 嵌入 GitHub Repo文件内容 –轻松从任何GitHub存储库中的文件添加内容。

    • Embed Twitch Stream – Embeds a Twitch Stream into the page.
    • 嵌入 Twitch Stream –将Twitch Stream嵌入页面。

    • Embed Twitch Stream Chat – Embeds the chat from a Twitch Stream into the page.
    • 嵌入 Twitch流聊天–将聊天从Twitch流嵌入页面。

    • Embed YouTube Video – Embeds a YouTube Video into the page.
    • 嵌入 YouTube视频 –将YouTube视频嵌入页面。

    • Embed Vimeo Video – Embeds a Vimeo Video into the page.
    • 嵌入 Vimeo视频 –将Vimeo视频嵌入页面。

    • Inline Code – Displays inline code snippets that are visually different than the body text.
    • 内联代码–显示在外观上与正文不同的内联代码段。

    • Code Block – Displays a simple code block for simple, small pieces of code.
    • 代码块–显示一个简单的代码块,用于显示简单的小段代码。

    • Button – Displays a purely CSS button with choice of color, text and link.
    • 按钮–显示一个纯CSS按钮,可以选择颜色,文本和链接。

    • User Interaction Messages – Displays a message with appropriate color that you can use to notify users of how their interaction is working.
    • 用户互动消息–用适当的颜色显示一条消息,您可以使用该消息来通知用户他们的互动方式。

    • Related Posts – Displays manually entered related posts on your post’s page that cycle through in a little slideshow.

    • 相关帖子–在您的帖子页面上显示手动输入的相关帖子,并以幻灯片的形式循环显示。

      Only for use with posts, NOT pages!

    • 仅用于帖子,不能用于页面!

    • Social Share – Displays a section for sharing your page on social media, shows links for Twitter, Facebook, Google Plus and Linkedin.
    • 社交共享–显示用于在社交媒体上共享页面的部分,并显示Twitter,Facebook,Google Plus和Linkedin的链接。

    Embed PDF

    嵌入PDF

    [embedPDF source=”http://yoursite.com/path-to-the-pdf.pdf” width=”###” height=”###”]

    [embedPDF source =” http://yoursite.com/path-to-the-pdf.pdf” width =“ ###” height =“ ###”]

    This Shortcode will embed a PDF into the page rather than making it a seperate link that must be clicked to be viewed.

    此简码会将PDF嵌入到页面中,而不是使其成为必须单击才能查看的单独链接。

    It is displayed in the browsers default PDF reader since it is embedded as an application.

    由于它作为应用程序嵌入,因此在浏览器的默认PDF阅读器中显示。

    The source attribute is the URL of the PDF and is required.

    source属性是PDF的URL,并且是必需的。

    The width and height attribute will set the size of the embedded application, and are both optional.

    width和height属性将设置嵌入式应用程序的大小,并且都是可选的。

    If they are not entered then the width is set to 100% and the height to 600.

    如果未输入,则将宽度设置为100%,将高度设置为600。

    Please note that setting the width to “auto” will not work.

    请注意,将宽度设置为“自动”将不起作用。

    Rather, please set the width to “100%” to get the same effect.

    相反,请将宽度设置为“ 100%”以获得相同的效果。

    If you are looking to add your own custom CSS to the container around the PDF embed, the class is “div.dobdev-pdf-container”.

    如果要在PDF嵌入周围的容器中添加自己的自定义CSS,则该类为“ div.dobdev-pdf-container”。

    This should only be done by someone experienced using CSS, otherwise the results could cause harm to the layout of your site.

    仅应由有使用CSS经验的人员来完成,否则结果可能会损害您的网站布局。

    Embed GitHub Gists

    嵌入GitHub Gists

    [embedGist source=”http://gist.github.com/your-account/gist-id”]

    [embedGist source =” http://gist.github.com/your-account/gist-id”]

    This Shortcode will embed a GitHub Gist into the page.

    此简码将在页面中嵌入GitHub Gist。

    The Gist will be embedded in a little box that makes it easy to share code samples with other developers (or whoever you want to share them with).

    Gist将嵌入在一个小盒子中,使与其他开发人员(或与之共享对象的人)共享代码示例变得容易。

    The source attribute is the URL to the Gist and is required.

    source属性是要旨的URL,并且是必需的。

    If you are looking to add some custom CSS to the Gists, they are automatically put into “div.gist” by GitHub.

    如果您要向Gist添加一些自定义CSS,GitHub会将它们自动放入“ div.gist”中。

    Use that class when doing any CSS changes.

    进行CSS更改时,请使用该类。

    This should only be done by someone experienced using CSS, otherwise the results could cause harm to the layout of your site.

    仅应由有使用CSS经验的人员来完成,否则结果可能会损害您的网站布局。

    Embed GitHub Repo Readme

    嵌入GitHub Repo自述文件

    [embedGitHubReadme owner=”Owner_of_Repo” repo=”Repo_Name” cache_id=”id”]

    [embedGitHubReadme owner =” Owner_of_Repo” repo =“ Repo_Name” cache_id =” id“]

    This shortcode will display the contents of any GitHub repository’s README file.

    此简码将显示GitHub存储库的README文件的内容。

    The markdown will displayed as HTML output onto the page.

    降价将显示为HTML输出到页面上。

    This shortcode uses GitHub API calls to ensure that as you update you README file the output from this shortcode will also update.

    该短代码使用GitHub API调用来确保在您更新自述文件时,该短代码的输出也将更新。

    The style will match that of your default page style, but if you want to change the style just wrap the shortcode inside of a div and then edit as much as the style as you want.

    该样式将与您的默认页面样式相匹配,但是如果要更改样式,只需将简码包装在div中,然后根据需要编辑任意样式。

    If you want to take advantage of WordPress’ transient API for caching, simply enter an ID for the cache_id argument.

    如果您想利用WordPress的临时API进行缓存,只需输入cache_id参数的ID。

    Note that this ID can be anything other than “NULL”, it doesn’t necessarily have to be a number.

    请注意,此ID可以是“ NULL”以外的任何数字,不一定必须是数字。

    Once entered this will cause the shortcode to cache the results of the API call for 24 hours.

    输入后,这将导致简码将API调用的结果缓存24小时。

    This means the shortcode will use those cached results and speed up the load times for 24 hours, at which point it will then call the API again to get any updates and use those cached results for another 24 hours.

    这意味着简码将使用这些缓存的结果并缩短24小时的加载时间,这时它将再次调用API以获取所有更新,并将这些缓存的结果再使用24小时。

    If you’re receiving an error similar to “SSL certificate : unable to get local issuer certificate” then please add the attribute insecure=”true” to your shortcode.

    如果您收到类似于“ SSL证书:无法获取本地发行者证书”的错误,请在短代码中添加属性insecure =“ true”。

    This stops cURL from verifying the peer’s certificate which may be required in some cases depending on your server.

    这将阻止cURL验证对等方的证书,这在某些情况下可能取决于服务器。

    If you would rather you can instead sdd the root CA (the CA signing the server certificate) to etc/ssl/certs/ca-certificates.crt which will allow secure connections to work.

    如果愿意,您可以将根CA(将服务器证书签名的CA)添加到etc / ssl / certs / ca-certificates.crt,这将使安全连接正常工作。

    By default the shortcode will use secure connections.

    默认情况下,简码将使用安全连接。

    Embed GitHub Repo File Contents

    嵌入GitHub Repo文件内容

    [embedGitHubContent owner=”Owner_of_Repo” repo=”Repo_Name” path=”Path_to_File” markdown=”Yes/No” cache_id=”id”]

    [embedGitHubContent owner =” Owner_of_Repo” repo =” Repo_Name” path =“ Path_to_File” markdown =“是/否” cache_id =” id“]

    This shortcode will display the contents of a file from any GitHub repository.

    此短代码将显示任何GitHub存储库中文件的内容。

    You must include the Owner of the repository, the repository name and the path to the file.

    您必须包括存储库的所有者,存储库名称和文件路径。

    Optionally, if the file is a markdown file you can put markdown=”yes” and the plugin will output the markdown as HTML onto the page.

    (可选)如果文件是markdown文件,则可以将markdown =“ yes”放到插件中,该插件会将markdown以HTML格式输出到页面上。

    If you give the shortcode a path to a folder rather than to a file it will output an array of the folders contents.

    如果您给简码提供一个文件夹路径而不是文件路径,它将输出文件夹内容的数组。

    If you want to take advantage of WordPress’ transient API for caching, simply enter an ID for the cache_id argument.

    如果您想利用WordPress的临时API进行缓存,只需输入cache_id参数的ID。

    Note that this ID can be anything other than “NULL”, it doesn’t necessarily have to be a number.

    请注意,此ID可以是“ NULL”以外的任何数字,不一定必须是数字。

    Once entered this will cause the shortcode to cache the results of the API call for 24 hours.

    输入后,这将导致简码将API调用的结果缓存24小时。

    This means the shortcode will use those cached results and speed up the load times for 24 hours, at which point it will then call the API again to get any updates and use those cached results for another 24 hours.

    这意味着简码将使用这些缓存的结果并缩短24小时的加载时间,这时它将再次调用API以获取任何更新,并将这些缓存的结果再使用24小时。

    If you’re receiving an error similar to “SSL certificate : unable to get local issuer certificate” then please add the attribute insecure=”true” to your shortcode.

    如果您收到类似于“ SSL证书:无法获取本地发行者证书”的错误,请在短代码中添加属性insecure =“ true”。

    This stops cURL from verifying the peer’s certificate which may be required in some cases depending on your server.

    这将阻止cURL验证对等方的证书,这在某些情况下可能取决于服务器。

    If you would rather you can instead sdd the root CA (the CA signing the server certificate) to etc/ssl/certs/ca-certificates.crt which will allow secure connections to work.

    如果愿意,您可以将根CA(将服务器证书签名的CA)添加到etc / ssl / certs / ca-certificates.crt,这将使安全连接正常工作。

    By default the shortcode will use secure connections.

    默认情况下,简码将使用安全连接。

    Embed Twitch Stream

    嵌入Twitch流

    [embedTwitch username=”your-username” width=”###” height=”###”]

    [embedTwitch用户名=“您的用户名” width =“ ###” height =” ###”]

    This Shortcode will embed a Twitch stream into the page.

    此简码会将Twitch流嵌入到页面中。

    The username attribute is the Twitch Stream’s username, which can be found at the end of the URL of the stream.

    用户名属性是Twitch流的用户名,可以在流URL的末尾找到。

    An example would be http://twitch.tv/day9tv.

    例如 http://twitch.tv/day9tv

    The username for this stream is “day9tv”, so that would be entered.

    该流的用户名是“ day9tv”,因此将被输入。

    The username is a required attribute.

    用户名是必填属性。

    The width and height attributes will set the size of the embedded stream, and both are optional attributes.

    width和height属性将设置嵌入式流的大小,并且两者都是可选属性。

    If they are not entered the width will default to 100% and the height will default to 378.

    如果未输入,则宽度默认为100%,高度默认为378。

    Please note that setting the width to “auto” will not work.

    请注意,将宽度设置为“自动”将不起作用。

    Rather, please set the width to “100%” to get the same effect.

    相反,请将宽度设置为“ 100%”以获得相同的效果。

    If you are looking to add your own custom CSS to the container around the Twitch Stream embed, the class is “div.dobdev-twitch-container”.

    如果您希望将自己的自定义CSS添加到Twitch Stream嵌入周围的容器中,则该类为“ div.dobdev-twitch-container”。

    This should only be done by someone experienced using CSS, otherwise the results could cause harm to the layout of your site.

    仅应由有使用CSS经验的人员来完成,否则结果可能会损害您的网站布局。

    Embed Twitch Stream Chat

    嵌入Twitch流聊天

    [embedTwitchChat username=”your-username” width=”###” height=”###”]

    [embedTwitchChat用户名=“您的用户名” width =“ ###” height =“ ###”]

    This Shortcode will embed a Twitch stream’s chat into the page.

    此简码会将Twitch流的聊天内容嵌入页面。

    The username attribute is the Twitch Stream’s username, which can be found at the end of the URL of the stream.

    用户名属性是Twitch流的用户名,可以在流URL的末尾找到。

    An example would be http://twitch.tv/day9tv.

    例如 http://twitch.tv/day9tv

    The username for this stream is “day9tv”, so that would be entered.

    该流的用户名是“ day9tv”,因此将被输入。

    The username is a required attribute.

    用户名是必填属性。

    The width and height attributes will set the size of the embedded chat, and both are optional attributes.

    width和height属性将设置嵌入式聊天的大小,并且两者都是可选属性。

    If they are not entered the width will default to 350 and the height will default to 500.

    如果未输入,则宽度默认为350,高度默认为500。

    If you are looking to add your own custom CSS to the container around the Twitch Chat embed, the class is “div.dobdev-twitch-chat-container”.

    如果您想在Twitch聊天嵌入周围的容器中添加自己的自定义CSS,则该类为“ div.dobdev-twitch-chat-c​​ontainer”。

    This should only be done by someone experienced using CSS, otherwise the results could cause harm to the layout of your site.

    仅应由有使用CSS经验的人员来完成,否则结果可能会损害您的网站布局。

    Embed YouTube Video

    嵌入YouTube视频

    [embedYouTube video=”video-id” width=”###” height=”###”]

    [embedYouTube video =” video-id” width =” ###” height =” ###”]

    This Shortcode will embed a YouTube video into the page.

    此简码会将YouTube视频嵌入页面。

    The video attribute is the YouTube video ID of the video you want to embed into the page.

    video属性是您要嵌入页面的视频的YouTube视频ID。

    It can be found at the end of the URL on YouTube.

    可以在YouTube网址的末尾找到它。

    For example, the video located at https://www.youtube.com/watch?v=uCdfze1etec<

    例如,位于 https://www.youtube.com/watch?v=uCdfze1etec <

    /a> has the video ID “uCdfze1etec”.

    / a>具有视频ID“ uCdfze1etec”。

    You will always find the video ID after the “watch?v=”.

    您将始终在“ watch?v =”之后找到视频ID。

    The video attribute is required.

    视频属性是必需的。

    The width and height attributes will set the size of the embedded video, and both are optional attributes.

    width和height属性将设置嵌入式视频的大小,并且两者都是可选属性。

    If they are not entered the width will default to 560 and the height will default to 315.

    如果未输入,则宽度默认为560,高度默认为315。

    Please note that setting the width to “auto” will not work.

    请注意,将宽度设置为“自动”将不起作用。

    Rather, please set the width to “100%” to get the same effect.

    相反,请将宽度设置为“ 100%”以获得相同的效果。

    If you are looking to add your own custom CSS to the container around the YouTube video embed, the class is “div.dobdev-youtube-container”.

    如果您希望将自己的自定义CSS添加到嵌入YouTube视频的容器中,则该类为“ div.dobdev-youtube-container”。

    This should only be done by someone experienced using CSS, otherwise the results could cause harm to the layout of your site.

    仅应由有使用CSS经验的人员来完成,否则结果可能会损害您的网站布局。

    Embed Vimeo Video

    嵌入Vimeo视频

    [embedVimeo video=”video-id” width=”###” height=”###”]

    [embedVimeo video =” video-id” width =” ###” height =” ###”]

    This Shortcode will embed a Vimeo video into the page.

    此简码会将Vimeo视频嵌入页面。

    The video attribute is the Vimeo video ID of the video you want to embed into the page.

    video属性是您要嵌入到页面中的视频的Vimeo视频ID。

    It can be found at the end of the URL on Vimeo.

    可以在Vimeo上URL的末尾找到它。

    For example, the video located at https://vimeo.com/14651522 has the video ID “14651522”.

    例如,位于 https://vimeo.com/14651522 的视频具有视频ID“ 14651522”。

    You will always find the video ID after the “/” in the Vimeo URL.

    您将始终在Vimeo URL中的“ /”之后找到视频ID。

    The video attribute is required.

    视频属性是必需的。

    The width and height attributes will set the size of the embedded video, and both are optional attributes.

    width和height属性将设置嵌入式视频的大小,并且两者都是可选属性。

    If they are not entered the width will default to 560 and the height will default to 315.

    如果未输入,则宽度默认为560,高度默认为315。

    Please note that setting the width to “auto” will not work.

    请注意,将宽度设置为“自动”将不起作用。

    Rather, please set the width to “100%” to get the same effect.

    相反,请将宽度设置为“ 100%”以获得相同的效果。

    If you are looking to add your own custom CSS to the container around the Vimeo video embed, the class is “div.dobdev-vimeo-container”.

    如果要在Vimeo视频嵌入周围的容器中添加自己的自定义CSS,则该类为“ div.dobdev-vimeo-container”。

    This should only be done by someone experienced using CSS, otherwise the results could cause harm to the layout of your site.

    仅应由有使用CSS经验的人员来完成,否则结果可能会损害您的网站布局。

    Inline Code Snippets

    内联代码段

    [startCode]

    [startCode]

    This shortcode will create the start tags for an inline code snippet which will then be ended using the [endCode] shortcode.

    此简码将为内联代码段创建开始标签,然后使用[endCode]简码结束。

    If you use these two together you can create small inline code samples that look great, are easy to copy, and distinguish themselves from the rest of your text content in appearance.

    如果将两者一起使用,则可以创建看起来不错,易于复制并在外观上与其余文本内容区分开的小型内联代码示例。

    These make it easy to include code snippets without having to switch to the HTML editor in WordPress.

    这些功能使添加代码段变得很容易,而无需在WordPress中切换到HTML编辑器。

    [endCode]

    [endCode]

    This shortcode will create the end tags for the inline code snippet started by [startCode].

    此简码将为[startCode]开头的内联代码段创建结束标签。

    If you use these two together you can create small inline code samples that look great, are esay to copy, and distinguish themselves from the rest of your text content in appearance.

    如果将两者一起使用,则可以创建看起来不错,易于复制并在外观上与其余文本内容区分开的小型内联代码示例。

    These make it easy to include code snippets without having to switch to the HTML editor in WordPress.

    这些功能使添加代码段变得很容易,而无需在WordPress中切换到HTML编辑器。

    If you want to change any of the styling for the inline code snippets, please use the CSS class “code.dobdev-code-inline”.

    如果要更改内联代码段的任何样式,请使用CSS类“ code.dobdev-code-inline”。

    From here you can change font size, font family, and even colour using your theme’s (hopefully child theme’s) stylesheet.

    在这里,您可以使用主题样式表(希望是子主题样式)来更改字体大小,字体系列,甚至颜色。

    This should only be done by someone experienced using CSS, otherwise the results could cause harm to the layout of your site.

    仅应由有使用CSS经验的人员来完成,否则结果可能会损害您的网站布局。

    Code Blocks

    代码块

    [startCodeBlock]

    [startCodeBlock]

    This shortcode will create the start tags for a code block which will then be ended using the [endCodeBlock] shortcode.

    此短代码将为代码块创建开始标签,然后使用[endCodeBlock]短代码结束该代码块。

    If you use these two together you can create small, simple code blocks that have a black background with white text, which is the common convention for code blocks.

    如果将两者一起使用,则可以创建带有黑色背景和白色文本的小型简单代码块,这是代码块的常见约定。

    This is great for showing Terminal commands or very small code snippets (I recommend using the embed GitHub Gists shortcode for longer code samples).

    这对于显示终端命令或非常小的代码片段非常有用(对于更长的代码示例,我建议使用embed GitHub Gists短代码)。

    [endCodeBlock]

    [endCodeBlock]

    This shortcode will create the end tags for the code snippet started by [startCode].

    此简码将为[startCode]开头的代码段创建结束标记。

    If you use these two together you can create small, simple code blocks that have a black background with white text, which is the common convention.

    如果将两者一起使用,则可以创建小的简单代码块,这些代码块具有黑色背景和白色文本,这是常见的约定。

    This is great for showing Terminal commands or very small code snippets (I recommend using the embed GitHub Gists shortcode for longer code samples).

    这对于显示终端命令或非常小的代码片段非常有用(对于更长的代码示例,我建议使用embed GitHub Gists短代码)。

    If you want to change any of the styling for the code blocks, please use the CSS class “pre.dobdev-code-block”.

    如果要更改代码块的任何样式,请使用CSS类“ pre.dobdev-code-block”。

    From here you can change font size, font family, background color, padding and even the actual text color using your theme’s (hopefully child theme’s) stylesheet.

    在这里,您可以使用主题样式表(希望是子主题样式)来更改字体大小,字体系列,背景颜色,填充,甚至是实际文本颜色。

    This should only be done by someone experienced using CSS, otherwise the results could cause harm to the layout of your site.

    仅应由有使用CSS经验的人员来完成,否则结果可能会损害您的网站布局。

    Buttons

    按钮

    [button text=”buttonText” color=”color” link=”#”]

    [button text =” buttonText” color =“ color” link =“#”]

    This shortcode will create a purely CSS button where ever you place it.

    此简码将在您放置的地方创建一个纯CSS按钮。

    The text attribute is the text that will appear within the button.

    文本属性是将显示在按钮内的文本。

    The color atrribute defines what color will show – the choices for color are red, blue, green, orange, purple, and turquoise.

    颜色属性定义了将显示的颜色–颜色的选择是红色,蓝色,绿色,橙色,紫色和青绿色。

    The link attribute is what link the user wants to redirect to when the button is clicked.

    链接属性是单击按钮时用户希望重定向到的链接。

    If you do not want a redirect on the button click, just use a “#” and the button will do nothing when clicked.

    如果您不希望在单击按钮时进行重定向,只需使用“#”,单击按钮就不会执行任何操作。

    User Interaction Messages

    用户互动消息

    [infoMessage text=”your-message”]

    [infoMessage text =“您的消息”]

    [successMessage text=”your-message”]

    [successMessage text =“您的消息”]

    [warningMessage text=”your-message”]

    [warningMessage text =“您的消息”]

    [errorMessage text=”your-message”]

    [errorMessage text =“您的消息”]

    These shortcodes will display a message with an appropriate color that will notify users of how their interaction is working.

    这些简码将以适当的颜色显示一条消息,该消息将通知用户其交互作用如何。

    The color scheme follows that of many other websites – blue is for information, green is for success, yellow is a warning and red signifies an error.

    颜色方案遵循许多其他网站的颜色方案–蓝色代表信息,绿色代表成功,黄色代表警告,红色代表错误。

    Related Posts

    相关帖子

    [relatedPosts posts=”1stPostID;

    [relatedPosts posts =” 1stPostID;

    2ndPostID;

    2ndPostID;

    3rdPostID”]

    3rdPostID”]

    eg.

    例如。

    [relatedPosts post=”1;

    [relatedPosts post =” 1;

    2;

    2;

    3;

    3;

    4″]

    4“]

    This shortcode will create a small slideshow of related posts wherever you put it.

    无论您放置在哪里,此简码都将创建一个有关相关帖子的小型幻灯片。

    Note that you must enter the post ID’s yourself, as this shortcode will not automatically index and display related posts for you.

    请注意,您必须自己输入帖子ID,因为该短代码不会自动为您编制索引并显示相关帖子。

    Although this is more work it has a significantly smaller load time than plugins which do automatically index them for you.

    尽管这项工作比较繁琐,但与为您自动为它们编制索引的插件相比,其加载时间要短得多。

    I would recommend this to people who run their own personal blogs with fewer articles.

    我建议向运行自己的个人博客且文章较少的人们推荐此方法。

    The slideshow is made using only CSS and jQuery.

    幻灯片仅使用CSS和jQuery制作。

    Please note that this shortcode should only be used on posts, NOT pages.

    请注意,此简码只能用于帖子,不能用于页面。

    It will cause pages to hang.

    这将导致页面挂起。

    Social Share

    社交分享

    [socialShare]

    [socialShare]

    This shortcode will create a section with links for sharing your page or post to Twitter, Facebook, Google Plus and Linkedin.

    此简码将创建一个带有链接的部分,用于共享您的页面或发布到Twitter,Facebook,Google Plus和Linkedin。

    The links are color coded to match the colors of each of their respective websites.

    链接采用颜色编码,以匹配其各自网站的颜色。

    You can use this like a normal shortcode in your page/post’s content or you can add it to your template files by using “echo do_shortcode(‘[socialShare]’);”.

    您可以在页面/帖子的内容中像普通的简码一样使用此代码,也可以使用“ echo do_shortcode('[socialShare]');”将其添加到模板文件中。

安装步骤

    1. Upload the entire dobsondev-shortcodes folder to the /wp-content/plugins/ directory.
    2. 将整个dobsondev-shortcodes文件夹上载到/ wp-content / plugins /目录。

    3. Activate the plugin through the ‘Plugins’ menu in WordPress.
    4. 通过WordPress中的“插件”菜单激活插件。

下载地址
https://downloads.wordpress.org/plugin/dobsondev-shortcodes.2.1.12.zip
-EOF-

AI助手支持GPT4.0