Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ajax/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php WordPressAjax加载更多插件_Php_Ajax_Wordpress_Plugins - Fatal编程技术网

Php WordPressAjax加载更多插件

Php WordPressAjax加载更多插件,php,ajax,wordpress,plugins,Php,Ajax,Wordpress,Plugins,对于我当前的Wordpress项目,我正在使用“ajax加载更多”插件: 我买的附加组件使用多个转发器模板。但是我有一些问题 首先让我解释一下情况 在第一页,我使用这个插件使用默认的转发器模板。这里一切都很好 在第二页中,我使用了这个插件,它使用了template_2 repeater模板。 这对加载的第一条记录很有效,但对其余记录无效 对于第一个,它使用模板_2 repeater,其他所有记录都使用默认的repeater模板,我不知道wy 我注意到了这个问题,因为我的块大小不正确。因此,我将

对于我当前的Wordpress项目,我正在使用“ajax加载更多”插件:

我买的附加组件使用多个转发器模板。但是我有一些问题

首先让我解释一下情况

在第一页,我使用这个插件使用默认的转发器模板。这里一切都很好

在第二页中,我使用了这个插件,它使用了template_2 repeater模板。 这对加载的第一条记录很有效,但对其余记录无效

对于第一个,它使用模板_2 repeater,其他所有记录都使用默认的repeater模板,我不知道wy

我注意到了这个问题,因为我的块大小不正确。因此,我将两个模板的文章标题都设置为静态。我一次额外加载5条记录。第一个得到的是预期中继器模板的标题,但我的所有其他记录都是默认的,我不知道为什么

我在第二页使用的简短代码:

echo do_shortcode('[ajax_load_more repeater="template_2" post_type="post, external_urls, files, infographics, quotes, tweets, videos, audios" taxonomy="stories" taxonomy_terms="'.$scenario->slug.'" posts_per_page="5" scroll="false" transition="fade" images_loaded="false" button_label="Next Page" offset="5" max_pages="100" button_label="Show more" pause="true" scroll_distance="100" pause_override="false"]');
我希望有人能帮我解决这个问题,截止日期很近,我真的需要解决这个问题


作为记录,我的Wordpress版本是:4.3.1

我遇到了同样的问题,结果是我在我的repeater模板中使用了变量名,这与Ajax Load More插件本身中的变量名相冲突

我有一个名为$type的变量,我将它设置为中继器内部的post类型。这导致在加载我的中继器时,ALM自己的$type变量在插件中被重写

当使用自定义转发器时,ALM type变量被设置为template\,我的转发器代码将其设置为当前的post类型

发布您的中继器代码,以便我们可以检查您是否在中继器中使用了任何可能干扰ALM的变量名