hi Ragnyl,
FooGallery only supports posts and pages, but there is a filter so that it will work with other post types.
You can add this snippet to your functions.php which will get it working:
function ragnyl_foogallery_allowed_post_types_for_attachment( $post_types ) {
$post_types[] = 'your_custom_post_type';
return $post_types;
}
add_filter( 'foogallery_allowed_post_types_for_attachment', 'ragnyl_foogallery_allowed_post_types_for_attachment' );
You will need to edit the above and change ‘your_custom_post_type’ with the actual post type in your scenario.
Hello bradvin,
Thank you for your reply. I tried to add the code snippet you provided to my current theme’s function.php but it’s not working. I already changed the ‘your_custom_post_type’ to ‘growing’ as my custom post type but still not working. Is there any way to do it?
Thanks,
Ragnyl
hi @ragnylromero28
I tested this locally and found the problem. Even though the code snippet now links the galleries to your custom post type, there is code missing to pull the new post type when displaying the gallery listing.
So it is doing the linking in the database, but its not displaying. I have added the code to pull usages from the same list of custom post type, and this will be released in the next version
Hello bradvin,
Ok I’ll just wait for the release of the next version. Thank you so much!
Sincerely,
Ragnyl