[wordpress插件] amr shortcode any widgetamr shortcode任何小部件

wordpress 插件 文章 2020-02-18 00:10 615 0 全屏看文

AI助手支持GPT4.0

评分
92
描述

Insert a widget or multiple widgets or a entire widget area (sidebar) into a page using a shortcode.

使用简码将一个或多个窗口小部件或整个窗口小部件区域(边栏)插入页面。

Set up your widget first in a normal sidebar.

首先在常规边栏中设置窗口小部件。

Check it works.

检查是否有效。

THEN Drag your chosen widgets to the sidebar called “widgets for shortcode”.

然后将您选择的窗口小部件拖到侧栏“短代码小工具”中。

Add the do_widget shortcode to the page where you would like the widget to appear (or the do_widget_area)

将do_widget短代码添加到您希望小部件出现的页面(或do_widget_area)

To use in the block editor, add a shortcode block, then type in (including the square brackets [do_widget widgetname] or copy the do_widget tip from the widget in the ‘Widgets for Shortcodes’ sidebar.

要在块编辑器中使用,请添加一个简码块,然后输入(包括方括号[do_widget窗口小部件名称]或从“短代码的窗口小部件”侧栏中的窗口小部件中复制do_widget提示。

Please see detailed info on shortcodes and parameters under the installation tab (depending what the plugin directory developers have most recently done, this may be under the FAQ, or at the very least under the readme.)

请在“安装”选项卡下查看有关短代码和参数的详细信息(取决于开发人员最近执行的插件目录的操作,这可能在FAQ中,或者至少在自述文件中)。

Using a widget more than once?

多次使用一个小部件吗?

Reference a specific widget instance from the do_widget shortcode, or the chosen sidebar from the do_widget_area shortcode.

从do_widget短代码中引用特定的小部件实例,或从do_widget_area短代码中选择所选的边栏。

Eg: [do_widget id=widget-n]

例如:[do_widget id = widget-n]

For example: You could use the query posts widget in the page to create a archive within a page, or the rss widget to list feed content from other sites.

例如:您可以使用页面中的查询帖子小部件在页面内创建档案,或者使用rss小部件列出其他站点的提要内容。

For more details see anmari.com

有关更多详细信息,请参见 anmari.com

The plugins default action is that it will magically find the settings for your themes sidebar and use the sidebar html to control the widgets output.

插件的默认操作是,它将神奇地找到主题侧边栏的设置,并使用侧边栏html来控制小部件的输出。

In most cases this means the widget will be styled as per the rest of your theme.

在大多数情况下,这意味着小部件将按照主题的其余部分进行样式设置。

If that does not look good, parameters exist to try override this behaviour.

如果效果不好,则存在参数尝试覆盖此行为。

EG: in twenty-fourteen theme widget text ends up being white on white!

EG:在二十四个主题小部件中,文本最终变成白色!

widget_classes=none fixes that.

widget_classes = none可解决此问题。

Eg: [do_widget widget_classes=none yourwidget]

例如:[do_widget widget_classes = none yourwidget]

Changed your theme and worried about losing the sidebar settings ?

更改了主题,担心丢失侧边栏设置吗?

No problem, the plugin will save and restore the widgets_for_shortcode settings.

没问题,该插件将保存并恢复widgets_for_shortcode设置。

On display it will then pick up the new themes sidebar settings.

在显示时,它将选择新的主题侧边栏设置。

Note:

注意:

PLEASE get your widgets working in a sidebar BEFORE activating this plugin, and please read https://wordpress.org/plugins/amr-shortcode-any-widget/installation/ and https://wordpress.org/plugins/

在激活此插件之前,请先在边栏中使您的小部件工作,请阅读https://wordpress.org/plugins/amr-shortcode-any-widget/installation/和https://wordpress.org/plugins/

amr-shortcode-any-widget/faq/ and/or see the settings page.

amr-shortcode-any-widget / faq /和/或参阅设置页面。

To see a list of your widgets in their sidebars, add ?do_widget_debug to the page with the do_widget shortcode.

要在侧边栏中查看小部件列表,请在页面上添加?do_widget_debug和do_widget短代码。

安装步骤

    1. Test your chosen widget in a normal sidebar or widget area first.

    2. 首先在正常的侧边栏或窗口小部件区域中测试所选窗口小部件。

    3. Then activate this plugin
    4. 然后激活此插件

    5. Go to Appearance > widgets and find the ” widgets for shortcode” sidebar or widget area
    6. 转到外观>小部件,然后找到“用于简码的小部件”侧栏或小部件区域

    7. Drag your chosen widget from your normal sidebar to the shortcodes sidebar.

    8. 将所选的小部件从常规侧边栏拖动到简码侧边栏。

      Save.

      保存。

    9. Now go to a page and enter a do_widget shortcode The shortcode any widget settings page has some helpful (hopefully) examples and links.

    10. 现在转到页面并输入do_widget简码任何窗口小部件设置页面的简码都有一些有用的示例和链接。

      • [do_widget widgetname] eg: [do_widget calendar]
      • [do_widget小部件名称],例如:[do_widget日历]

      • [do_widget “widget name”].

      • [do_widget“小部件名称”]。

        eg: [do_widget “tag cloud”]

      • 例如:[do_widget“标签云”]

      • [do_widget id=widgetid] .

        [do_widget id = widgetid]。

        eg: [do_widget id=tag-cloud-3]

        例如:[do_widget id = tag-cloud-3]

      • [do_widget_area] (will use the “widgets in shortcodes” widget area / sidebar

        [do_widget_area](将使用“简码小工具”小部件区域/侧边栏

      • [do_widget_area sidebarid] or [do_widget_area widget_area=sidebarid] for another sidebar or widget area – eg: to maximise likelihood of getting your theme’s widget css to apply.

      • [do_widget_area sidebarid]或[do_widget_area widget_area = sidebarid]用于另一个侧边栏或窗口小部件区域-例如:最大化使主题的窗口小部件CSS应用的可能性。

      [do_widget …] Parameters:

      [do_widget…]参数:

        • nameofwidget or name=”nameofwidget” This is NOT the title of the widget.

        • nameofwidget 或name =“ nameofwidget ”这不是小部件的标题。

          THis is the name that you see in the widgets menu page even when unassigned to a sidebar.

          这是您在小部件菜单页面中看到的名称,即使未分配到侧边栏也是如此。

          For existing users , you can also use just the name of the widget without name=.

          对于现有用户,您也可以仅使用窗口小部件的名称,而无需使用name =。

          It must be the first parameter then.

          然后,它必须是第一个参数。

          You can only do this with the name, not the id.

        • 您只能使用名称,而不能使用ID。

        • id=wordpress assigned id of widget.

        • id = wordpress指定的小部件ID

          Examples: id=meta-3, id=tag-cloud-9 etc

        • 例如:id = meta-3,id = tag-cloud-9等

        • title=false to hide the widgets title OR to override your themes first sidebar html settings for widget titles, use title=htmltag where htmltag is one of h1,h2

        • title = false可隐藏小部件标题,或覆盖主题的小部件标题的第一个侧边栏html设置,请使用title = htmltag ,其中 htmltag 是h1,h2之一

          ,h3,h4,h5,header,strong,em.

          ,h3,h4,h5,标题,strong,em。

        • wrap=htmltag where htmltag is one of div,p,main,aside,section.

        • wrap = htmltag 其中, htmltag 是div,p,main,aside,section之一。

          This will override your themes first sidebar widget wrapping html.

        • 这将覆盖您的主题第一个包装html的侧边栏小部件。

        • widget_classes=none This will remove the class “widget” from the wrapping html and the class “widget_title” from the title html.

        • widget_classes = none这将从包装的html中删除类“ widget”,并从标题html中删除类“ widget_title”。

          This may be enough to remove any unwanted css caused by your theme.

          这可能足以消除由您的主题引起的任何不必要的CSS。

        • class=yourclassname By default the plugin will add a class of amr-widget to the wrapping html.

        • class = 您的类名默认情况下,插件将在包装的html中添加一类amr-widget。

          You can use this to add any special css.

          您可以使用它添加任何特殊的CSS。

          Add css either by editing your themes stylesheet if it is a custom theme, or using something like the wordpress custom css plugin.

        • 通过编辑主题样式表(如果它是自定义主题)或使用诸如wordpress自定义css插件之类的东西来添加css。

        • sidebar=”sidebarname” will default to widgets_for_shortcode sidebar.

        • sidebar =” sidebarname ”将默认为widgets_for_shortcode侧栏。

          Only use if you want to re-use a widget already being used in another sidebar.

          仅在要重新使用另一个边栏中已使用的小部件时使用。

          THis is theme dependent and WILL break if you change themes.

          这取决于主题,如果您更改主题,将会中断。

          Safer to use the widget_id.

        • 更安全地使用widget_id。

        [do_widget_area …] Parameters:

        [do_widget_area…]参数:

          • widget_area=yourwidgetarea defaults to ‘widgets_for_shortcodes’ if nothing entered
          • 如果未输入任何内容,

          • widget_area = 您的widgetarea 默认为“ widgets_for_shortcodes”

          • widget_area_class=none /* option to remove theme styling by removing the widget_area class from the sidebar html */
          • widget_area_class = none / *选项可通过从侧边栏html * / 中删除widget_area类来删除主题样式

          • widget_classes=none /* option to remove the widget class from the widget wrappinghtml
          • widget_classes = none / *选项可从小部件包装HTML中删除小部件类

          • class=yourclassname default is amr_widget_area.

          • class = 您的类名的默认值为amr_widget_area。

            This will affect the widget area NOT the individual widgets.

            这将影响小部件区域,而不是单个小部件。

            At the moment can only remove the widget classes, not replace them when using do_widget_area.

          • 目前只能删除小部件类,而在使用do_widget_area时则不能替换它们。

          Advanced users WARNING: using do_widget_area with a widget area other than the shortcode one means that if you changes themes and the new theme has different sidebars, then this shortcode with a named widget area will not work.

          高级用户警告:将do_widget_area与短代码区以外的窗口小部件区域一起使用意味着,如果您更改主题并且新主题具有不同的侧边栏,则此带有命名窗口小部件区域的短代码将不起作用。

          See the settings page for links to help your create the shortcodes in a page.

          请参阅“设置”页面上的链接,以帮助您在页面中创建简码。

          The plugin has been tested with most standard widgets (rss feeds, tag cloud, pages, meta, search, and of course my own plugins widgets – upcoming events list, calendar and user lists.

          该插件已经过大多数标准小部件(rss feed,标签云,页面,元数据,搜索,当然还有我自己的插件小部件-即将发生的事件列表,日历和用户列表)的测试。

          If you use a widget more than once for different reasons, you may need to use the widget id to isolate which widget instance and it’s settings to use.

          如果出于各种原因多次使用小部件,则可能需要使用小部件ID来隔离要使用的小部件实例及其设置。

          ie: [do_widget id=categories-6] .

          即:[do_widget id = categories-6]。

          If you just use the name, it will display all widgets in the shortcode sidebar with that name (all instances).

          如果仅使用名称,它将在带有该名称的短代码侧栏中显示所有小部件(所有实例)。

          If you liked this plugin, you might also like my other plugins:

          如果您喜欢此插件,则可能还喜欢我的其他插件:

            • icalevents.com – a ics compliant events plugin fully integrated with wordpress, so it will work with many other plugins (seo

            • icalevents.com –符合ics的事件插件,与wordpress完全集成,因此可以与许多其他插件一起使用(seo

              , maps, social)

            • ,地图,社交)

            • wpusersplugin.com – a suite of plugins to help with membership sites.

            • wpusersplugin.com –一套帮助会员网站的插件。

              Major plugin is amr users

            • 主要插件是 amr用户

下载地址
https://downloads.wordpress.org/plugin/amr-shortcode-any-widget.zip
-EOF-

AI助手支持GPT4.0