[wordpress插件] Display URL Params显示网址参数

wordpress 插件 文章 2020-04-19 17:20 583 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

URL parameters are tags that are added to the end of your URL, usually for tracking purposes or for dynamic content insertion.

URL参数是添加到URL末尾的标记,通常用于跟踪目的或用于动态内容插入。

The most known type of URL parameters is UTM parameters, used by Google and Facebook ad links, in order to find out more about how your visitors interact with your ad.

URL参数最常见的类型是Google和Facebook广告链接使用的UTM参数,以了解有关访问者如何与广告互动的更多信息。

With our Dynamic Text Replacement shortcode, you can access URL parameters in the Query String of the URL and display it on your pages, post or even use it to pre-fill forms.

使用我们的“动态文本替换”简码,您可以访问URL的查询字符串中的URL参数,并将其显示在您的页面上,发布甚至使用它来预先填写表单。

Works with ACF, Beaver Builder, Visual Composer (WPBakery Page Builder) etc

与ACF,Beaver Builder,Visual Composer(WPBakery Page Builder)等配合使用

Use case 1 – using URL parameters in the copy of your page

用例1 –在页面副本中使用URL参数

You can do this if you want to use URL parameters on your page to dynamically display things like location or someone’s name if you already have that information.

如果您想使用页面上的URL参数来动态显示位置或某人的名字(如果您已经有此信息),则可以执行此操作。

Make sure the page’s URL includes the parameters you want to use, such as https://mylandingpage.domain.com/?location=Sydney&name=Chris

确保页面的URL包含您要使用的参数,例如https://mylandingpage.domain.com/?location=Sydney&name=Chris

Then you can write the copy of any text element on the page to include those parameters, such as “Hello [URLParam param=’name’]!

然后,您可以在页面上写入任何文本元素的副本以包含这些参数,例如“ Hello [URLParam param ='name']!

Welcome to [URLParam param=’location’]!”

欢迎使用[URLParam param ='location']!”

This example would display as “Hello Hannes!

此示例将显示为“ Hello Hannes!

Welcome to Sydney!”

欢迎来到悉尼!”

Displaying GET parameters directly

直接显示GET参数

 [URLParam param='paramname']

  [URLParam param ='paramname']

Shows the value of GET named paramname (‘Hannes’ in the example URL), or “blank value” if none given.

显示名为paramname(在示例URL中为“ Hannes”)的GET的值,如果未给出,则显示“空白值”。

 Hello Hannes!

 您好Hannes!

Shows the value of GET named paramname, or empty space if none

显示名为paramname的GET的值,如果没有则显示空白

安装步骤

Easiest way:

最简单的方法:

    1. Go to your WordPress admin control panel’s plugin page
    2. 转到WordPress管理控制台的插件页面

    3. Search for ‘URL params’
    4. 搜索“ URL参数”

    5. Click Install
    6. 点击安装

    7. Click Activate on the plugin
    8. 点击插件上的激活

    9. Start using shortcodes as described in our examples
    10. 按照我们的示例所述开始使用简码

    If you cannot install from the WordPress plugins directory for any reason, and need to install from ZIP file:

    如果由于某种原因无法从WordPress插件目录安装,并且需要从ZIP文件安装:

      1. Upload directory and contents to the /wp-content/plugins/ directory, or upload the ZIP file directly in

      2. 将目录和内容上传到 / wp-content / plugins / 目录,或直接在
        中上传ZIP文件

        the Plugins section of your WordPress admin

      3. WordPress管理员的“插件”部分

      4. Follow the instructions from step 4 above
      5. 按照上面第4步中的说明进行操作

下载地址
https://downloads.wordpress.org/plugin/display-url-params.1.1.zip
-EOF-

AI助手支持GPT4.0