I have the site http://staging.cwtest.co.uk/entertainment/celebrity and i wrote the code for ajax loadmore in the button of the page. When click the load more button the ajax load the data that's is fine but i have use the plugin code inside the ajax which doesn't work properly. I have set the php parsing yes and output set the "output". So what is solution.
And ajax response code is like this
<?php
$i = "{segment_4}";
?>
<section class="subsection ajax">
<div class="row">
{exp:channel:entries channel="news" category="{segment_3}" limit="2" dynamic="off" offset="`<?php echo $i;?>`" orderby="date" sort="desc" disable="categories|category_fields"}
<div class="col-md-4 col-sm-4">
<div class="post-wrap">
{if "{image}"!="" && '{exp:bn_file_exists:check_file src="{image}"}'}
<div class="post-images"><a href="/{embed:category_name}/{segment_3}/{url_title}"><img src="{image}"></a></div>
{/if}
<div class="post-content">
<h3><a href="/{embed:category_name}/{segment_3}/{url_title}">{title}</a>
</h3>
<p>
{exp:word_limit total="15"}
{body}
{/exp:word_limit}
</p>
</div>
</div>
</div>
{/exp:channel:entries}
<div class="col-md-4 col-sm-4">
{exp:channel:entries channel="news" category="{segment_3}" limit="2" dynamic="off" offset="`<?=($i+2);?>`" orderby="date" sort="desc" disable="categories|category_fields"}
<div class="wrap-content clearfix">
<div class="post-wrap">
{if {count} == 1}
{if "{image}"!="" && '{exp:bn_file_exists:check_file src="{image}"}'}
<div class="post-images"><a href="/{embed:category_name}/{segment_3}/{url_title}"><img
src="{image}"></a></div>
{/if}
<div class="post-content">
<h3><a href="/{embed:category_name}/{segment_3}/{url_title}">{title}</a></h3>
<p>{exp:word_limit total="15"}{body}{/exp:word_limit}</p>
</div>
{if:else}
<div class="post-content">
<h3><a href="/{embed:category_name}/{segment_3}/{url_title}">{title}</a></h3>
<p>{exp:word_limit total="15"}{body}{/exp:word_limit}</p>
</div>
{if "{image}"!="" && '{exp:bn_file_exists:check_file src="{image}"}'}
<div class="post-images"><a href="/{embed:category_name}/{segment_3}/{url_title}"><img
src="{image}"></a></div>
{/if}
{/if}
</div>
</div>
{/exp:channel:entries}
<!-- /Wrap content -->
</div>
<!-- /Cols -->
</div>
<!-- /Row -->
<div class="row margin-top-20">
{exp:channel:entries channel="news" category="{segment_3}" limit="3" offset="`<?=($i+4);?>`" orderby="date" sort="desc" disable="categories|category_fields"}
<div class="col-md-3 col-sm-3">
<div class="post-wrap">
{if "{image}"!="" && '{exp:bn_file_exists:check_file src="{image}"}'}
<div class="post-images"><a href="/{embed:category_name}/{segment_3}/{url_title}"><img
src="{image}"></a></div>
{/if}
<div class="post-content">
<h3><a href="/{embed:category_name}/{segment_3}/{url_title}">{title}</a></h3>
<p>
{exp:word_limit total="15"}
{body}
{/exp:word_limit}
</p>
</div>
</div>
</div>
{/exp:channel:entries}
<!-- /Cols -->
<div class="col-md-3 col-sm-3">
<div class="advertisement">
{ad_300x250_general_top}
</div>
</div>
<!-- /Cols -->
</div>
<!-- /Row -->
<div class="row margin-top-20">
{exp:channel:entries channel="news" category="{segment_3}" limit="3" offset="`<?=($i+8);?>`" orderby="date" sort="desc" disable="categories|category_fields"}
<div class="col-md-4 col-sm-4">
<div class="wrap-content clearfix">
<div class="post-wrap">
{if "{image}"!="" && '{exp:bn_file_exists:check_file src="{image}"}'}
<div class="post-images"><a href="/{embed:category_name}/{segment_3}/{url_title}"><img
src="{image}"></a></div>
{/if}
<div class="post-content">
<h3><a href="/{embed:category_name}/{segment_3}/{url_title}">{title}</a></h3>
<p>
{exp:word_limit total="15"}
{body}
{/exp:word_limit}
</p>
</div>
</div>
</div>
<!-- /Wrap content -->
</div>
{/exp:channel:entries}
</div>
<div class="row margin-top-20">
<div class="col-md-9">
{exp:channel:entries channel="news" category="{segment_3}" limit="4" offset="`<?=($i+11);?>`" orderby="date" sort="desc" disable="categories|category_fields"}
<div class="col-md-3 col-sm-3">
<div class="post-wrap">
{if '{exp:surgeree:modulo numerator="{count}" denominator="2"}' == 0}
<div class="post-content" id="{count}">
<h3><a href="/{embed:category_name}/{segment_3}/{url_title}">{title}</a>
</h3>
<p>
{exp:word_limit total="15"}
{body}
{/exp:word_limit}
</p>
</div>
{if "{image}"!="" && '{exp:bn_file_exists:check_file src="{image}"}'}
<div class="post-images"><a href="/{embed:category_name}/{segment_3}/{url_title}"><img src="{image}"></a></div>
{/if}
{if:else}
{if "{image}"!="" && '{exp:bn_file_exists:check_file src="{image}"}'}
<div class="post-images"><a href="/{embed:category_name}/{segment_3}/{url_title}"><img src="{image}"></a></div>
{/if}
<div class="post-content" id="{count}">
<h3><a href="/{embed:category_name}/{segment_3}/{url_title}">{title}</a>
</h3>
<p>
{exp:word_limit total="15"}
{body}
{/exp:word_limit}
</p>
</div>
{/if}
</div>
</div>
{/exp:channel:entries}
<!-- /Cols -->
</div>
<!-- /Cols 9 -->
<div class="col-md-3 col-sm-3">
<div class="add">
{ad_300x100_general_top}
</div>
<div class="add">
{ad_300x100_general_top}
</div>
</div>
<!-- /Cols -->
</div>
</section>
<?php exit; ?>