Changeset 3163652
- Timestamp:
- 10/06/2024 05:14:54 PM (5 months ago)
- Location:
- list-custom-post-with-featured-image
- Files:
-
- 12 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
list-custom-post-with-featured-image/trunk/css/lcpfi_style.css
r1593805 r3163652 1 .lcpfi-post-gallery{ 2 width: 100%; 3 position: relative; 4 } 5 .row { 6 display: flex; 7 flex-wrap: wrap; 8 } 1 9 .lcpfi-post-gallery .lcpfi-section { 10 flex: 0 0 25%; 2 11 float: left; 3 12 width: 25%; … … 5 14 } 6 15 .lcpfi-post-gallery .lcpfi-section img{ 7 width:284px;8 height: 177px;16 max-width: 163px; 17 height: 177px; 9 18 } -
list-custom-post-with-featured-image/trunk/list-cp-featured-image.php
r2185342 r3163652 6 6 Author: Vikas Sharma 7 7 Author URI: https://profiles.wordpress.org/devikas301 8 Version: 1. 18 Version: 1.2 9 9 License: GPLv2 10 10 */ … … 18 18 19 19 global $post, $wpdb; 20 $lcpfi_args = shortcode_atts( array(20 $lcpfi_args = shortcode_atts([ 21 21 'post_type' => 'post', 22 22 'limit' => '5', 23 23 'order' => 'DESC', 24 24 'pagination'=> 'on' 25 ), $lcpfi_atts);25 ], $lcpfi_atts); 26 26 27 27 $lcpfi_pggp = explode('/page/', $_SERVER['REQUEST_URI']); 28 28 29 29 if(isset($lcpfi_pggp[1])){ 30 30 $lcpfi_pggpcount = explode('/', $lcpfi_pggp[1]); 31 31 $lcpfi_gvpage = $lcpfi_pggpcount[0]; 32 32 } else { 33 33 $lcpfi_gvpage = 1; 34 34 } 35 35 36 36 $lcpfi_paged = (get_query_var('paged')) ? get_query_var('paged') : ((get_query_var('page')) ? get_query_var('page') : 1); 37 37 38 $lcpfi_postargs = array(38 $lcpfi_postargs = [ 39 39 'post_type' => $lcpfi_args['post_type'], 40 40 'post_status' => 'publish', … … 43 43 'order' => $lcpfi_args['order'], 44 44 'page' => $lcpfi_paged 45 );45 ]; 46 46 //'offset' => 0, 47 47 … … 103 103 * function. 104 104 */ 105 $pagination_args = array(105 $pagination_args = [ 106 106 'base' => get_pagenum_link(1).'%_%', 107 107 'format' => 'page/%#%', … … 117 117 'add_args' => false, 118 118 'add_fragment' => '' 119 );119 ]; 120 120 121 121 $lcpfi_paginate_links = paginate_links($pagination_args);
Note: See TracChangeset
for help on using the changeset viewer.