我正在使用 elementor wordpress 插件。我使用 elementor pro 插件制作了一个表格。我想在提交表单时获取数据并发送带有表单数据的外部 api 调用。我研究了 elementor 文档,但没有找到清晰的代码示例。有没有办法将表单数据发送到外部api。
我试图在 localhost 的 Mac 上为 wordpress 安装 Elementor 插件,但安装失败。这些是细节:
主机名: /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-content/plugins
FTP用户名: root
密码:
使用密码,我收到此错误警报:
Failed to connect to FTP Server /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-content/plugins:21
Run Code Online (Sandbox Code Playgroud)
在没有密码的情况下,我收到了此错误警报:
Unable to connect to the filesystem. Please confirm your credentials.
Run Code Online (Sandbox Code Playgroud)
我搜索了类似的情况,发现必须在代码中添加这一行:
define('FS_METHOD','direct’);
Run Code Online (Sandbox Code Playgroud)
然后我收到了这条消息:
Installation failed. could not create directory.
Run Code Online (Sandbox Code Playgroud)
我不熟悉代码编写,而且我是 Wordpress 的新手,非常感谢您的帮助。
问候
我刚开始使用 Wordpress,几周前我发布了一个网站。今天我想编辑主页,但我收到以下错误:
Sorry, the content area was not found in your page. You must call the_content function in the current template, in order for Elementor to work on this page.
我还没有编辑过我的主页,几周前它运行良好。有没有人可以帮我解决这个问题?
如何检查 WordPress 页面当前是“作为常规页面”查看还是“在 Elementor 可视化编辑器中”查看?
我编写了一个插件,当页面上存在特定的短代码时,该插件会重定向用户。它的工作方式就像一个魅力,但不幸的是,当页面重定向客户端时,Elementor 可视化编辑器就会消失。我希望插件仅在 Elementor 编辑器未处于活动状态时重定向。
我的第一个想法是检查 URL 是否包含action=elementor,就像 Elementor 编辑器处于活动状态时那样,然后执行如下操作:
global $wp;
if ( strpos(home_url( $wp->request ), 'action=elementor') !== false ) {
    // don't redirect
}
Run Code Online (Sandbox Code Playgroud)
但这不起作用,因为home_url( $wp->request )只返回页面的永久链接,而不返回实际调用的 URL。
这里有人使用Elementor吗?你如何通过代码触发弹出窗口?例如。
function popup_call(){
    ...
    if(....){
        //trigger the popup here...
    } 
}
Run Code Online (Sandbox Code Playgroud) 我在我的 WordPress 网站上安装了 Elementor Pro,我正在编写一个自定义插件,该插件将执行一些操作并以编程方式创建一个新页面。我能够创建页面,但问题是,我想以编程方式在这个新页面中插入一个 Elementor 小部件。
我已经联系了 Elementor 支持,看看他们是否对我有任何意见。但他们的回答是:
尽管我很想为您提供帮助,但自定义代码/片段或任何指导超出了我们的支持范围,因为我们仅提供对 Elementor 现有功能的支持。
那么无论如何我可以通过代码实现这一点,我的意思是将特定的 Elementor Widget 插入页面?
我正在使用 Elementor Pro 构建我的页面模板,并且我已使用 \xe2\x80\x93 下面的函数将标签标签更改为“主题”,这在除 Elementor Archive Title 小部件(由通过常规标题小部件,并将动态标签设置为“存档标题”)。
\n以下是我将标签更改为主题的功能:
\n      // Change tags to topics\n\nfunction wd_hierarchical_tags_register() {\n\n  // Maintain the built-in rewrite functionality of WordPress tags\n\n  global $wp_rewrite;\n\n  $rewrite =  array(\n    \'hierarchical\'              => false, // Maintains tag permalink structure\n    \'slug\'                      => get_option(\'tag_base\') ? get_option(\'tag_base\') : \'tag\',\n    \'with_front\'                => ! get_option(\'tag_base\') || $wp_rewrite->using_index_permalinks(),\n    \'ep_mask\'                   => EP_TAGS,\n  );\n\n// Redefine tag labels (or leave them the same)\n    \n      $labels = array(\n        \'name\'                       => _x( \'Topics\', \'Taxonomy General Name\', \'hierarchical_tags\' ),\n …Run Code Online (Sandbox Code Playgroud) 我已经使用 Elementor 表单小部件创建了一个表单,它应该是一个用户注册表单。现在我想获取表单输入字段并将用户添加到数据库中。如何获取表单字段?并且必须取消电子邮件的发送(Elementor 表单小部件默认执行的操作)。我可以在执行自定义代码(将用户插入数据库)后取消它exit,以便 Elementor ajax 调用不会发送电子邮件。
小部件中有一些钩子(fe“ elementor_pro/forms/form_submitted”和其他一些钩子),但我想知道执行此操作的适当方法。
你有什么想法吗?请告诉我。
多谢!
我想得到什么?
我正在创建 Elementor 自定义小部件。这将输出特定帖子类型的帖子列表。到目前为止一切都很好。我得到了我需要的一切。但问题是,我必须使用 Elementor 自定义(使用 Elementor 创建)输出帖子内容。我使用过WP_Query和get_posts()。我得到的只是原始 HTML,没有任何 Elementor 自定义类。请检查图像

我做了什么?
public function wp_post_list($slug_name,$order='ASC',$orderby='date'){
        $args = [
                'post_type' => $slug_name,
                'posts_per_page' => -1,
                'orderby'          => $orderby,
                'order'            => $order,
            ];
            return $all_posts = new \WP_Query($args);
    }
public function post_list($slug_name,$order='ASC',$orderby='date'){
            $args = [
                    'post_type' => $slug_name,
                    'posts_per_page' => -1,
                    'orderby'          => $orderby,
                    'order'            => $order,
                ];
            $all_posts = get_posts($args);
            return $all_posts;
    }
public function skin_time_line($slug){
        $st = $this->get_settings_for_display();
        $order = $st['post_order'];
        $orderby = $st['post_orderby'];
        $posts = …Run Code Online (Sandbox Code Playgroud)