Hi Tushar,
First, your plugin is straightforward and really created for non-developers and Developers.
One issue I found is I cannot add multiple classes like this [https://prnt.sc/rguIN2m77aFJ] on the item_class parameter.
It removes parenthesis and spaces. [https://prnt.sc/6eyHBT-jdxBG] (which is important for my project).
I understand that the plugin used the sanitize_html_class() for security purposes. Is that can be disabled optionally? [https://prnt.sc/G0amZxdFXaCE]
P.S. I don’t want to edit the plugin directly.
Thank you so much. Cheers!
]]>Hi,
I am using your CPT AJAX LOAD MORE plugin with template-3. I have issue with loading more posts on button click, it appears only the loading application. I tried to deactivate the other plugins on my site, but the problem was not solved. I tried with the other templates, but no success. Can you please help me to find out what cause the issue? Maybe there is any conflict, but i cannot find out.
Thanks in advance.
Hi, i was testing your plugin on my pc on local, and when i try to retrive a custom post type, from a custom taxonomy, i get this error
Fatal error: Uncaught Error: Call to undefined function alm_get_post_format() in F:\laragon\www\gunterheine\wp-content\plugins\cpt-ajax-load-more\includes\class-cpt-alm-query-args.php:88 Stack trace: #0 F:\laragon\www\gunterheine\wp-content\plugins\cpt-ajax-load-more\includes\class-cpt-alm-shortcodes.php(88):
All work fine when i only use whitouth de taxonomy in shortcode
this i shorcode with problem
[cpt_ajax_load_more post_type=”propiedades” init_load=”1″ posts_per_page=”1″ template=”arriendos-template” button_text=”Cargar más” taxonomy=”tipopropiedad” taxonomy_terms=”ventas”]
this works fine
[cpt_ajax_load_more post_type=”propiedades” init_load=”1″ posts_per_page=”1″ template=”arriendos-template” button_text=”Cargar más”]
I created my cutom post type and custom taxonomy with “Custom Post Type UI” Plugin from WebDevStudios.
Is there is something i doing wrong or missing?
also i was wondering if using loading_style on shorcode has any parameter to deactivate css styles for items
Great plugin!
Regards
Rafael Andrews
Hi,
Your plugin works great but I have a problem.
It works already for posts and two CPTs but for the third CPT it says:
‘Not permision to allow this post’.
I double checked the CPT definition is CPT UI but I don’t know what do I miss. Can you help to display this CPT?
All the best,
Champdor
It’s strange as it works when I’m signed in but when I’ve viewing the page in incognito while not signed in to wordpress, the load more button just doesn’t load anything.
There’s no error in the console, the only thing I can see in the Network tab (in Dev tools) is ?warning=unauthorised
GET /training/?warning=unauthorised HTTP/1.1
Connection: keep-alive
sec-ch-ua: "Google Chrome";v="95", "Chromium";v="95", ";Not A Brand";v="99"
Accept: application/json, text/javascript, */*; q=0.01
X-Requested-With: XMLHttpRequest
sec-ch-ua-mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36
sec-ch-ua-platform: "Windows"
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en;q=0.9
Cookie: PHPSESSID=449d152f3a8f2d9192defb88ea5e18bb
I think for some reason it’s trying to get the posts from a different page /training/ – can we specify a page with all posts manually?
]]>Hi,
I used the hook ‘cpt_alm_post_not_found’ to change the ‘post not found’ message for my custom loop. but the parameter ‘$id’ in your code (here: https://plugins.blacktheme.net/cpt-ajax-load-more/docs/filters/#cpt_alm_post_not_found) returns ‘Post not found’ message when echoed.
How to change the ‘Post not found’ message for each loop?
my code:
function change_the_ajax_loop_not_found_text($id){
return '<p style="padding-left: 10px">Nothing found.'.$id.'</p>';
}
add_filter( 'cpt_alm_post_not_found', 'change_the_ajax_loop_not_found_text', 10, 1);
Regards,
Nami
Hi,
I have just recently started playing about with your plugin in the hope that it will help me out on my site build. However I have an issue with it not showing for a custom post type with a custom taxonomy, I have a custom post type called ‘success_stories’ and a custom taxonomy called ‘story_category’, my shortcode is below:
[cpt_ajax_load_more post_type=”‘.$grid_post_type.'” category=”‘.$grid_cat_id->slug.'” template=”load-more-custom” grid=”3″ button_text=”Load more” init_load=”3″ posts_per_page=”3″]
I am also using an ACF field to allow the editors to choose which custom post type to use and then also the relevant custom post taxonomy, I have tried with just category and although the grid works and displays it displays everything not just the ones contained within the category, I have also tried using the taxonomy_terms and taxonomy fields in the shortcode too but still noting, in fact when I use the taxonomy fields I get a fatal error ?? unfortunately I’m building locally at the minute and therefore no URL is available as yet.
Thank you
Sibbo100
We have installed the plugin on a page that generally works quite well, in chrome, opera, edge, we don’t have a single problem, but we did the test in Mozilla Firefox and in Safari and when we clicked on load more, A window appears saying invalid token, and this only happens when there is no session started in wordpress, if we start the session while in Firefox, the button works
]]>I’m testing out the plugin for a site, and I seem to be hitting a limit on how many total posts can be shown. It gets to about 80 posts, then the ‘Load more’ button doesn’t do anything when clicked.
I definitely have more posts (about 300 in total at the moment).
This is the shortcode that I’m using:
[cpt_ajax_load_more post_type="post" category="news,more-news,recent" template="template-3" grid="3" init_load="6" posts_per_page="6"]
Any ideas?
]]>Hi,
I’m using this awesome plugin but are now building archives for my CPT UI Taxonomies.
I”ve got a CPT called “Recept” and this post type has also 4 different taxonomies, one of them is “Receptskapare”. Below is my attempt to create the loop-receptskapare.php, but on the page, it still loads all the recept posts, not only the ones slexted by the array, how can I solve this?
Thanks,
<?php
$args = array(
‘post_type’ => ‘recept’,
‘init_load’ => 12,
‘scroll’ => ‘true’,
‘posts_per_page’ => 8,
‘post_staus’ => ‘publish’,
‘template’ => ‘content-recept’,
‘tax_query’ => array(
array(
‘taxonomy’ => ‘receptskapare’,
‘field’ => ‘slug’,
‘terms’ => array(‘skippa-sockret’)
)
)
);
echo cpt_alm_render($args);
?>
]]>Hi, Is it possible to load posts ‘random’?
You have the order_by shortcode parameter which i have tried “random” and also “rand” which didn’t work.
is there away to do this ?
thanks
]]>HI, how to offset posts from the ones already showing?
when click the load more it shows the current ones already showing and i cant see option to fix this ?
]]>Hi
Is it possible to display a specific post on specific template/page? If yes, please let me know
Regards,
Jam
The fix you added in version 1.5.1 did not solve the problem I’ve been having with multiple post types in the shortcode, e.g. post_type=”post, page”, so I had to modify one line in class-cpt-alm-security.php in order to get it to work properly:
Line 20 old:
case self::allow_post_type($post_type):
Line 20 new:
case self::allow_post_type(array_map('trim', explode(',',$post_type))):
Please incorporate this, or something like this, into your next version release.
And with this, I can finally start using cpt-ajax-load-more on my live site!
]]>When clicking load more button it gives this error :
app.js?ver=1.0.0:161 Uncaught TypeError: Cannot read property 'attributes' of undefined
at n.fn.init.getDataAttributes (app.js?ver=1.0.0:161)
at n.fn.init.initialize (app.js?ver=1.0.0:34)
at n.fn.init.$.fn.InfinizyLoadMore (app.js?ver=1.0.0:176)
at HTMLDivElement.<anonymous> (app.js?ver=1.0.0:184)
at Function.each (jquery.js?ver=1.12.4-wp:2)
at n.fn.init.each (jquery.js?ver=1.12.4-wp:2)
at app.js?ver=1.0.0:181
at app.js?ver=1.0.0:191
]]>
Loading all categories, I need it to load only the category it’s on.
The post page shows all categories and infinity scroll, and that is cool.
I have a problem when I click on a category. It shows all categories instead of just post of that category.
]]>Hi there!
Is there anyway to disable the default css? The default css is messing with the grid every time.
Really like the plugin tho! Thanks.
]]>Hello, again. While continuing my testing, I discovered that when the shortcode includes “page” as the post_type, I get no listing, and the following error appears:
Not permission to allow this post
I get this error even when I have all other plugins disabled. I also get it if the “page” type is combined with the “post” type, i.e., post_type=”post, page”.
This error does not occur when I’m using [ajax_load_more…] so it appears to be something specific to [cpt_ajax_load_more…]. And I can’t find any permissions issues on my site’s content.
Thanks in advance for your help.
]]>While testing lists on Safari, I found that the “Read More” box was spread across the entire bottom of the image, and that the upper left corner was not rounded. To fix these problems, the following should be included in your CSS entry “.cpt-list-box .cpt-list-details”:
width:auto;
-webkit-border-radius:10px 0 0 0px;
Now it now looks right in Chrome, Firefox, and Safari. I haven’t tried any other browsers, though.
For now, I’ve just put these into my custom templates.
]]>Hi, there,
When editing the page on my test site, when I inserted the following shortcode:
[cpt_ajax_load_more post_type=”post” template=”default” posts_per_page=”8″]
and clicked “Update”, I got the following error message:
Updating failed. The response is not a valid JSON response.
However, the page DOES get updated, and seems to be working fine, so this is more an annoyance than a show-stopper.
I’m running WordPress 5.5.1. I tried disabling all other plug-ins, and also tried switching to another theme, but I always get this error whenever I update.
I used to use the “plain” Ajax Load More [ajax_load_more …] and I never got this error.
I’m running apache and PHP 7.4.10.
Any ideas?
Thanks.
]]>Hi,
I have been using the plugin for a while. I have a custom loop where it needs to grab custom post from the logged in user. I have below code:
$project_args = array(
'id' => 'user-posts-list',
'post_type' => 'custom_post_type',
'post_status' => 'publish',
'posts_per_page' => 1,
'author' => get_current_user_id(),
'init_load' => 10,
'template' => 'mycustom-template-list'
);
echo cpt_alm_render($project_args);
and below code in my functions.php
add_filter('cpt_alm_query_args','cpt_export_custom_loop',10,2);
function cpt_export_custom_loop($args, $id){
if($id == 'user-posts-list'){
$args['author'] = get_current_user_id();
}
return $args;
}
the loop is working fine when the page is loaded but when ‘load more’ button is clicked, other author’s posts are loaded.
please help me fix this.
Regards,
]]>Hi,
I’m using below code to display posts.
$args = array(
'id' => 'my-list',
'post_type' => 'my_custom_post_type',
'post_staus' => 'publish',
'posts_per_page' => 2,
'init_load' => 2,
'template' => 'my-template',
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'upload_type',
'value' => 'user',
'compare' => '='
)
)
);
echo cpt_alm_render($args);
everything is working great, but the results doesn’t get affect by the ‘meta_query’ in the $arg (note: I’m using “Advanced Custom Fields” for meta fields)
PS: @tushargohel thank you for your help in previous issues, I don’t have any other medium to contact you other than this support forum.
]]>Hi,
I am using ajax load more loop with the following shortcode:
[cpt_ajax_load_more id=”2″ post_type=”bgm” template=”default” posts_per_page=”2″]
but the loop is loading all the posts in the post type at the beginning with no load more button.
please help me with that.
Regards,
]]>Hi,
I tried using the plugin with a child theme and a custom template. but the custom template is not working when the cpt-alm/loop/template-name.php file is located in child theme folder.
but it is working when the same folder is moved to parent theme.
Thanks,
Nami Suki
Hi,
I’m getting the following error when installing the plugin through wordpress admin plugin installation page.
“Installation failed: Download failed. cURL error 7: Failed to connect to downloads.www.ads-software.com port 443: Connection timed out”
]]>