{"id":54220,"date":"2017-02-11T11:04:00","date_gmt":"2017-02-11T11:04:00","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/list-custom-post-with-featured-image\/"},"modified":"2026-08-19T07:01:25","modified_gmt":"2026-08-19T07:01:25","slug":"list-custom-post-with-featured-image","status":"publish","type":"plugin","link":"https:\/\/hu.wordpress.org\/plugins\/list-custom-post-with-featured-image\/","author":15298435,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.3.0","stable_tag":"trunk","tested":"7.0.4","requires":"5.0","requires_php":"7.0","requires_plugins":null,"header_name":"List Custom Post with featured image","header_author":"Vikas Sharma","header_description":"","assets_banners_color":"","last_updated":"2026-08-19 07:01:25","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/list-custom-post-with-featured-image\/","header_author_uri":"https:\/\/profiles.wordpress.org\/devikas301","rating":5,"author_block_rating":0,"active_installs":10,"downloads":2688,"num_ratings":3,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0":{"tag":"1.0","author":"devikas301","date":"2023-08-20 07:47:19"},"1.1":{"tag":"1.1","author":"devikas301","date":"2024-10-06 17:19:22"},"1.2":{"tag":"1.2","author":"devikas301","date":"2026-08-07 06:41:32"}},"upgrade_notice":{"1.3.0":"<p>Security release - please update. Also adds a plugin dashboard in the admin area, under the &quot;Post Gallery&quot; menu. IMPORTANT: your galleries will look different afterwards. Images are no longer locked to 163x177px; they now fill the column at a consistent aspect ratio, and the layout uses its own responsive grid instead of Bootstrap classes. Check any page using the shortcode after updating.<\/p>\n\n<p>Details: <code>.row<\/code> and <code>.col-md-3<\/code> are replaced by <code>.lcpfi-row<\/code> and <code>.lcpfi-col<\/code>, and the inner <code>.wpb_wrapper<\/code> div was removed, so custom CSS targeting those needs updating. Version 1.2 also styled every <code>.row<\/code> element on the site, not just its own; that no longer happens, which may affect unrelated parts of a theme that had come to rely on it. The shortcode, the <code>lcpfi_listpost()<\/code> and <code>lcpfi_pagination()<\/code> functions, the <code>LCPFI<\/code> stylesheet handle and all <code>LCPFI_*<\/code> constants are unchanged.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":3},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.2"],"block_files":[],"assets_screenshots":{"screenshot-1.jpg":{"filename":"screenshot-1.jpg","revision":3654030,"resolution":"1","location":"plugin","width":923,"height":487},"screenshot-3.jpg":{"filename":"screenshot-3.jpg","revision":3654030,"resolution":"3","location":"plugin","width":975,"height":288},"screenshot-2.jpg":{"filename":"screenshot-2.jpg","revision":3654030,"resolution":"2","location":"plugin","width":1661,"height":135}},"screenshots":{"1":"Gallery page in the front-end.","2":"Showing shortcode on plugin section back-end.","3":"Using shortcode on back-end &amp; same as its working with phpcode using do_shortcode()."}},"plugin_section":[],"plugin_tags":[1794,1795,900,3480,80],"plugin_category":[43],"plugin_contributors":[144127],"plugin_business_model":[],"class_list":["post-54220","plugin","type-plugin","status-publish","hentry","plugin_tags-custom-post-type","plugin_tags-featured-image","plugin_tags-pagination","plugin_tags-post-grid","plugin_tags-shortcode","plugin_category-customization","plugin_contributors-devikas301","plugin_committers-devikas301"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/list-custom-post-with-featured-image.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/list-custom-post-with-featured-image\/trunk\/screenshot-1.jpg?rev=3654030","caption":"Gallery page in the front-end."},{"src":"https:\/\/ps.w.org\/list-custom-post-with-featured-image\/trunk\/screenshot-2.jpg?rev=3654030","caption":"Showing shortcode on plugin section back-end."},{"src":"https:\/\/ps.w.org\/list-custom-post-with-featured-image\/trunk\/screenshot-3.jpg?rev=3654030","caption":"Using shortcode on back-end &amp; same as its working with phpcode using do_shortcode()."}],"raw_content":"<!--section=description-->\n<p>This plugin creates a responsive gallery of any public post type using a shortcode. Each item shows the featured image (or a placeholder when none is set) and the post title, linked to the post. Pagination is optional.<\/p>\n\n<p><strong>Features<\/strong><\/p>\n\n<ul>\n<li>Works with posts, pages and any public custom post type<\/li>\n<li>Responsive CSS Grid layout: 4 \/ 3 \/ 2 \/ 1 columns as the screen narrows<\/li>\n<li>Optional pagination that works with pretty and plain permalinks<\/li>\n<li>Placeholder image when a post has no featured image<\/li>\n<li>Templates can be overridden from your theme<\/li>\n<li>No jQuery, no external frameworks<\/li>\n<\/ul>\n\n<h3>Shortcode<\/h3>\n\n<pre><code>[lcpostlist post_type=\"post\" limit=\"4\" order=\"ASC\" pagination=\"off\"]\n<\/code><\/pre>\n\n<p>Attributes:<\/p>\n\n<ul>\n<li><code>post_type<\/code> - any public post type. Default <code>post<\/code>.<\/li>\n<li><code>limit<\/code> - posts per page, 1 to 100. <code>-1<\/code> means \"as many as possible\" and resolves to 100. Default <code>5<\/code>.<\/li>\n<li><code>order<\/code> - <code>ASC<\/code> or <code>DESC<\/code>. Default <code>DESC<\/code>.<\/li>\n<li><code>pagination<\/code> - <code>on<\/code> or <code>off<\/code>. Default <code>on<\/code>.<\/li>\n<\/ul>\n\n<p>In a theme file:<\/p>\n\n<pre><code>&lt;?php echo do_shortcode( '[lcpostlist post_type=\"post\" limit=\"8\"]' ); ?&gt;\n<\/code><\/pre>\n\n<!--section=installation-->\n<p>Use WordPress Add New Plugin feature, searching \"List Custom Post with featured image\", or download the archive and:<\/p>\n\n<ol>\n<li>Unzip the archive on your computer<\/li>\n<li>Upload the <code>list-custom-post-with-featured-image<\/code> directory to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Use the shortcode to show the post gallery anywhere<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"how%20do%20i%20change%20the%20number%20of%20columns%3F\"><h3>How do I change the number of columns?<\/h3><\/dt>\n<dd><p>The layout is driven by a CSS custom property. Add this to your theme's Additional CSS:<\/p>\n\n<pre><code>.lcpfi-post-gallery { --lcpfi-columns: 3; }\n<\/code><\/pre>\n\n<p>You can also change <code>--lcpfi-gap<\/code> and <code>--lcpfi-ratio<\/code> the same way.<\/p><\/dd>\n<dt id=\"how%20do%20i%20change%20the%20markup%3F\"><h3>How do I change the markup?<\/h3><\/dt>\n<dd><p>Copy any file from the plugin's <code>templates\/<\/code> folder into a <code>lcpfi\/<\/code> folder in your theme, for example <code>yourtheme\/lcpfi\/gallery-item.php<\/code>, and edit it there. Your copy survives plugin updates.<\/p><\/dd>\n<dt id=\"the%20old%20uppercase%20shortcode%20still%20works%3F\"><h3>The old uppercase shortcode still works?<\/h3><\/dt>\n<dd><p>Yes. <code>[LCPOSTLIST]<\/code> is still registered alongside the new lowercase <code>[lcpostlist]<\/code>.<\/p><\/dd>\n<dt id=\"why%20does%20my%20gallery%20show%20fewer%20posts%20than%20i%20asked%20for%3F\"><h3>Why does my gallery show fewer posts than I asked for?<\/h3><\/dt>\n<dd><p>limit is capped at 100 per page to protect the site, and <code>limit=\"-1\"<\/code> resolves to that same cap rather than running an unbounded query. Use pagination for larger sets.<\/p><\/dd>\n<dt id=\"how%20do%20i%20show%20a%20message%20when%20there%20are%20no%20posts%3F\"><h3>How do I show a message when there are no posts?<\/h3><\/dt>\n<dd><p>Nothing is output by default. To show a message:<\/p>\n\n<pre><code>add_filter( 'lcpfi_no_posts_message', function () { return 'Nothing here yet.'; } );\n<\/code><\/pre><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.3.0<\/h4>\n\n<ul>\n<li>New: plugin dashboard in the admin area, under the \"Post Gallery\" menu, with an overview, getting started steps, full shortcode reference, changelog and support links.<\/li>\n<li>New: the dashboard lists the post types available on your site, so you always know what to put in the post_type attribute.<\/li>\n<li>New: \"Dashboard\" link next to Deactivate on the Plugins screen.<\/li>\n<li>Security: escape all output (post titles, permalinks and image attributes).<\/li>\n<li>Security: validate <code>post_type<\/code> against public post types, clamp <code>limit<\/code> to 1-100 and whitelist <code>order<\/code>.<\/li>\n<li>Security: removed unsanitised <code>$_SERVER['REQUEST_URI']<\/code> parsing, which was also unused.<\/li>\n<li>Security: added a direct file access guard.<\/li>\n<li>Fix: pagination links now build correctly with plain permalinks, query strings and static front pages.<\/li>\n<li>Fix: the gallery no longer renders an empty block when there are no matching posts. Output stays empty as before; use the <code>lcpfi_no_posts_message<\/code> filter to show a message.<\/li>\n<li>Fix: <code>limit=\"-1\"<\/code> still means \"show everything\", now resolved to the 100 per page cap.<\/li>\n<li>Fix: removed the invalid <code>page<\/code> query argument and unused globals.<\/li>\n<li>Improved: namespaced CSS. The generic <code>.row<\/code> and Bootstrap <code>col-md-3<\/code> classes are gone, so the plugin no longer collides with theme or page builder grids.<\/li>\n<li>Improved: responsive CSS Grid layout with 4 \/ 3 \/ 2 \/ 1 columns and consistent image aspect ratios.<\/li>\n<li>Improved: the stylesheet is only loaded on pages that use the shortcode, and is versioned for cache busting. The admin stylesheet only loads on the plugin's own page.<\/li>\n<li>Improved: rewritten as classes with theme-overridable templates in <code>templates\/<\/code>.<\/li>\n<li>Improved: lowercase <code>[lcpostlist]<\/code> shortcode added, uppercase <code>[LCPOSTLIST]<\/code> kept for compatibility.<\/li>\n<li>Improved: translation ready, and accessible pagination with a labelled <code>nav<\/code> element.<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Pagination support added to the shortcode.<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Placeholder image for posts without a featured image.<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Show any post type as a responsive gallery of featured images and titles, with pagination, anywhere via shortcode.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hu.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/54220","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hu.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/hu.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/hu.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=54220"}],"author":[{"embeddable":true,"href":"https:\/\/hu.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/devikas301"}],"wp:attachment":[{"href":"https:\/\/hu.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=54220"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/hu.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=54220"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/hu.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=54220"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/hu.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=54220"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/hu.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=54220"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/hu.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=54220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}