Changeset 2754553
- Timestamp:
- 07/11/2022 12:18:15 PM (4 years ago)
- Location:
- posts-by-shortcode
- Files:
-
- 26 added
- 2 edited
-
tags/1.1 (added)
-
tags/1.1/assets (added)
-
tags/1.1/assets/banner-772x250-rtl.png (added)
-
tags/1.1/assets/banner-772x250.png (added)
-
tags/1.1/assets/icon-128x128.png (added)
-
tags/1.1/assets/screenshot-1.png (added)
-
tags/1.1/assets/screenshot-2.png (added)
-
tags/1.1/assets/screenshot-3.png (added)
-
tags/1.1/assets/screenshot-4.png (added)
-
tags/1.1/assets/screenshot-5.png (added)
-
tags/1.1/assets/screenshot-6.png (added)
-
tags/1.1/assets/screenshot-7.png (added)
-
tags/1.1/assets/screenshot-8.png (added)
-
tags/1.1/css (added)
-
tags/1.1/css/style.css (added)
-
tags/1.1/posts-by-shortcode-rk.php (added)
-
tags/1.1/readme.txt (added)
-
tags/1.1/templates (added)
-
tags/1.1/templates/images (added)
-
tags/1.1/templates/images/blog-default.jpg (added)
-
tags/1.1/templates/pbs_rk_layout_1.php (added)
-
tags/1.1/templates/pbs_rk_layout_2.php (added)
-
tags/1.1/templates/pbs_rk_layout_3.php (added)
-
tags/1.1/templates/pbs_rk_layout_4.php (added)
-
tags/1.1/templates/pbs_rk_layout_5.php (added)
-
tags/1.1/templates/pbs_rk_layout_6.php (added)
-
trunk/posts-by-shortcode-rk.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
posts-by-shortcode/trunk/posts-by-shortcode-rk.php
r2747389 r2754553 69 69 <p><code>[show_posts_pbs_rk layout="1" read_more_lebel="Continue Reading >"]</code> <br><i style="background: #f4f4d4;">Set Custom Label for Read More Button.</i></p> 70 70 <p><code>[show_posts_pbs_rk layout="1" show_author="yes"]</code> <br><i style="background: #f4f4d4;">Show author name in posts.</i></p> 71 <p><code>[show_posts_pbs_rk layout="1" post_id="52"]</code> <br><i style="background: #f4f4d4;">Show single post by post id.</i></p> 71 72 <?php 72 73 } … … 104 105 if($atts['show_author']){$show_author = $atts['show_author'];}else{$show_author = 'no';} 105 106 107 /* Show Single Post by ID */ 108 if($atts['post_id']){$show_post_by_id = $atts['post_id'];}else{$show_post_by_id = '0';} 109 106 110 /* Get Posts Arguments */ 107 $args = array( 108 'post_type' => 'post', 109 'orderby' => 'ID', 110 'cat' => $category_id, 111 'post_status' => 'publish', 112 'order' => 'DESC', 113 'posts_per_page' => $post_per_page, 114 'offset' => $offset 115 ); 111 if($show_post_by_id > 0){ 112 $args = array( 113 'post_type' => 'post', 114 'post_status' => 'publish', 115 'p' => $show_post_by_id, 116 ); 117 }else{ 118 $args = array( 119 'post_type' => 'post', 120 'orderby' => 'ID', 121 'cat' => $category_id, 122 'post_status' => 'publish', 123 'order' => 'DESC', 124 'posts_per_page' => $post_per_page, 125 'offset' => $offset 126 ); 127 } 116 128 117 129 /* Get Posts from Arguments */ -
posts-by-shortcode/trunk/readme.txt
r2747393 r2754553 65 65 `[show_posts_pbs_rk layout="1" show_author="yes"]` 66 66 67 Show Single post by post id 68 69 `[show_posts_pbs_rk layout="1" post_id="52"]` 70 67 71 68 72 #### Full Features List:
Note: See TracChangeset
for help on using the changeset viewer.