WP Show Posts - Version 0.2

Version Description

  • Fix issue with posts showing up in wrong area on page
  • Remove read more link if the <!-- more --> tag is used
  • Wrap read more button in div: .wpsp-read-more
Download this release

Release Info

Developer edge22
Plugin Icon 128x128 WP Show Posts
Version 0.2
Comparing to
See all releases

Code changes from version 0.1 to 0.2

css/wp-show-posts-min.css CHANGED
@@ -1 +1 @@
1
- body .wp-show-posts a{box-shadow:0 0 0 transparent}.wp-show-posts-entry-title a{text-decoration:none}a.wp-show-posts-read-more,a.wp-show-posts-read-more:visited{display:inline-block;margin:0 0 1em;padding:8px 15px;border:2px solid #222;border-radius:3px;color:#222;font-size:0.8em}a.wp-show-posts-read-more:hover,a.wp-show-posts-read-more:focus{border:2px solid transparent;color:#fff;background:#222}.wp-show-posts-image{margin-bottom:1em}.wp-show-posts-image.wpsp-image-left{float:left;margin-right:1.5em}.wp-show-posts-image.wpsp-image-right{float:right;margin-left:1.5em}.wp-show-posts-image.wpsp-image-center{display:block;text-align:center}.wp-show-posts-image img{margin:0 !important;vertical-align:bottom}.wp-show-posts-entry-header{margin:0 0 1em;padding:0}.wp-show-posts .wp-show-posts-entry-title{font-size:30px;line-height:35px;margin:0}.wp-show-posts-updated{display:none}.wp-show-posts-entry-summary,.wp-show-posts-entry-content{margin-bottom:1em}.wp-show-posts-entry-meta{font-size:0.8em;color:rgba( 0,0,0,0.5 )}.wp-show-posts-meta a,.wp-show-posts-meta a:visited{color:rgba( 0,0,0,0.5 )}.stack-wp-show-posts-byline,.stack-wp-show-posts-posted-on{display:block}.wp-show-posts-entry-meta-below-post{margin-bottom:1em}.wp-show-posts-columns:not(.wp-show-posts-masonry){display:flex;flex-wrap:wrap}.wp-show-posts-columns .wp-show-posts-single:not(.wp-show-posts-masonry-block){display:flex;flex-direction:row}.wp-show-posts-columns .wp-show-posts-single:not(.wp-show-posts-masonry-block) .wp-show-posts-image img{flex:0 0 auto;object-fit:scale-down}.wpsp-clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0}.wp-show-posts:not(.wp-show-posts-columns) .wp-show-posts-single:not(:last-child){margin-bottom:2em}.wp-show-posts-columns .wp-show-posts-entry-title{font-size:25px}.wp-show-posts-columns .wp-show-posts-single.col-md-4 .wp-show-posts-entry-title,.wp-show-posts-columns .wp-show-posts-single.col-md-3 .wp-show-posts-entry-title,.wp-show-posts-columns .wp-show-posts-single.col-md-20 .wp-show-posts-entry-title{font-size:20px}@media (min-width: 768px){.col-1,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12,.col-20{float:left}.col-1{width:8.333333%}.col-2{width:16.666667%}.col-3{width:25%}.col-4{width:33.333%}.col-5{width:41.666667%}.col-6{width:50%}.col-7{width:58.333333%}.col-8{width:66.666667%}.col-9{width:75%}.col-10{width:83.333333%}.col-11{width:91.666667%}.col-12{width:100%}.col-20{width:20%}}.wp-show-posts-inner *:last-child{margin-bottom:0}.screen-reader-text{clip:rect(1px, 1px, 1px, 1px);position:absolute !important}.screen-reader-text:hover,.screen-reader-text:active,.screen-reader-text:focus{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0, 0, 0, 0.6);clip:auto !important;color:#21759b;display:block;font-size:14px;font-weight:bold;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}.wpsp-clearfix:after{content:".";display:block;overflow:hidden;visibility:hidden;font-size:0;line-height:0;width:0;height:0}
1
+ body .wp-show-posts a{box-shadow:0 0 0 transparent}.wp-show-posts-entry-title a{text-decoration:none}a.wp-show-posts-read-more,a.wp-show-posts-read-more:visited{display:inline-block;padding:8px 15px;border:2px solid #222;border-radius:3px;color:#222;font-size:0.8em}.wpsp-read-more{margin:0 0 1em;display:inline-block}a.wp-show-posts-read-more:hover,a.wp-show-posts-read-more:focus{border:2px solid transparent;color:#fff;background:#222}.wp-show-posts-image{margin-bottom:1em}.wp-show-posts-image.wpsp-image-left{float:left;margin-right:1.5em}.wp-show-posts-image.wpsp-image-right{float:right;margin-left:1.5em}.wp-show-posts-image.wpsp-image-center{display:block;text-align:center}.wp-show-posts-image img{margin:0 !important;vertical-align:bottom}.wp-show-posts-entry-header{margin:0 0 1em;padding:0}.wp-show-posts .wp-show-posts-entry-title{font-size:30px;line-height:35px;margin:0}.wp-show-posts-updated{display:none}.wp-show-posts-entry-summary,.wp-show-posts-entry-content{margin-bottom:1em}.wp-show-posts-entry-meta{font-size:0.8em;color:rgba( 0,0,0,0.5 )}.wp-show-posts-meta a,.wp-show-posts-meta a:visited{color:rgba( 0,0,0,0.5 )}.stack-wp-show-posts-byline,.stack-wp-show-posts-posted-on{display:block}.wp-show-posts-entry-meta-below-post{margin-bottom:1em}.wp-show-posts-columns:not(.wp-show-posts-masonry){display:flex;flex-wrap:wrap}.wp-show-posts-columns .wp-show-posts-single:not(.wp-show-posts-masonry-block){display:flex;flex-direction:row}.wp-show-posts-columns .wp-show-posts-single:not(.wp-show-posts-masonry-block) .wp-show-posts-image img{flex:0 0 auto;object-fit:scale-down}.wpsp-clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0}.wp-show-posts:not(.wp-show-posts-columns) .wp-show-posts-single:not(:last-child){margin-bottom:2em}.wp-show-posts-columns .wp-show-posts-entry-title{font-size:25px}.wp-show-posts-columns .wp-show-posts-single.col-md-4 .wp-show-posts-entry-title,.wp-show-posts-columns .wp-show-posts-single.col-md-3 .wp-show-posts-entry-title,.wp-show-posts-columns .wp-show-posts-single.col-md-20 .wp-show-posts-entry-title{font-size:20px}@media (min-width: 768px){.col-1,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12,.col-20{float:left}.col-1{width:8.333333%}.col-2{width:16.666667%}.col-3{width:25%}.col-4{width:33.333%}.col-5{width:41.666667%}.col-6{width:50%}.col-7{width:58.333333%}.col-8{width:66.666667%}.col-9{width:75%}.col-10{width:83.333333%}.col-11{width:91.666667%}.col-12{width:100%}.col-20{width:20%}}.wp-show-posts-inner *:last-child{margin-bottom:0}.screen-reader-text{clip:rect(1px, 1px, 1px, 1px);position:absolute !important}.screen-reader-text:hover,.screen-reader-text:active,.screen-reader-text:focus{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0, 0, 0, 0.6);clip:auto !important;color:#21759b;display:block;font-size:14px;font-weight:bold;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}.wpsp-clearfix:after{content:".";display:block;overflow:hidden;visibility:hidden;font-size:0;line-height:0;width:0;height:0}
css/wp-show-posts.css CHANGED
@@ -9,7 +9,6 @@ body .wp-show-posts a {
9
  a.wp-show-posts-read-more,
10
  a.wp-show-posts-read-more:visited {
11
  display: inline-block;
12
- margin: 0 0 1em;
13
  padding: 8px 15px;
14
  border: 2px solid #222;
15
  border-radius: 3px;
@@ -17,6 +16,11 @@ a.wp-show-posts-read-more:visited {
17
  font-size: 0.8em;
18
  }
19
 
 
 
 
 
 
20
  a.wp-show-posts-read-more:hover,
21
  a.wp-show-posts-read-more:focus {
22
  border: 2px solid transparent;
9
  a.wp-show-posts-read-more,
10
  a.wp-show-posts-read-more:visited {
11
  display: inline-block;
 
12
  padding: 8px 15px;
13
  border: 2px solid #222;
14
  border-radius: 3px;
16
  font-size: 0.8em;
17
  }
18
 
19
+ .wpsp-read-more {
20
+ margin: 0 0 1em;
21
+ display: inline-block;
22
+ }
23
+
24
  a.wp-show-posts-read-more:hover,
25
  a.wp-show-posts-read-more:focus {
26
  border: 2px solid transparent;
inc/functions.php CHANGED
@@ -261,7 +261,9 @@ function wpsp_read_more()
261
 
262
  // The read more button
263
  if ( $read_more_text ) : ?>
264
- <a title="<?php echo esc_attr( get_the_title() ); ?>" class="wp-show-posts-read-more <?php echo $read_more_style; ?> <?php echo $read_more_color; ?>" href="<?php esc_url( the_permalink() ); ?>"><?php echo $read_more_text; ?></a>
 
 
265
  <?php endif;
266
  }
267
  endif;
261
 
262
  // The read more button
263
  if ( $read_more_text ) : ?>
264
+ <div class="wpsp-read-more">
265
+ <a title="<?php echo esc_attr( get_the_title() ); ?>" class="wp-show-posts-read-more <?php echo $read_more_style; ?> <?php echo $read_more_color; ?>" href="<?php esc_url( the_permalink() ); ?>"><?php echo $read_more_text; ?></a>
266
+ </div>
267
  <?php endif;
268
  }
269
  endif;
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === WP Show Posts ===
2
  Contributors: edge22
3
- Donate link: https://generatepress.com/ongoing-development
4
  Tags: show posts, display posts shortcode, portfolio, gallery, post columns
5
  Requires at least: 4.0
6
  Tested up to: 4.6
7
- Stable tag: 0.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -147,10 +147,20 @@ In most cases, #1 will work fine and is way easier.
147
 
148
  == Changelog ==
149
 
 
 
 
 
 
150
  = 0.1 =
151
  * Initial release
152
 
153
  == Upgrade Notice ==
154
 
 
 
 
 
 
155
  = 0.1 =
156
  * Initial release
1
  === WP Show Posts ===
2
  Contributors: edge22
3
+ Donate link: https://wpshowposts.com
4
  Tags: show posts, display posts shortcode, portfolio, gallery, post columns
5
  Requires at least: 4.0
6
  Tested up to: 4.6
7
+ Stable tag: 0.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
147
 
148
  == Changelog ==
149
 
150
+ = 0.2 =
151
+ * Fix issue with posts showing up in wrong area on page
152
+ * Remove read more link if the <!-- more --> tag is used
153
+ * Wrap read more button in div: .wpsp-read-more
154
+
155
  = 0.1 =
156
  * Initial release
157
 
158
  == Upgrade Notice ==
159
 
160
+ = 0.2 =
161
+ * Fix issue with posts showing up in wrong area on page
162
+ * Remove read more link if the <!-- more --> tag is used
163
+ * Wrap read more button in div: .wpsp-read-more
164
+
165
  = 0.1 =
166
  * Initial release
wp-show-posts.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP Show Posts
4
  Plugin URI: https://wpshowposts.com
5
  Description: WP Show Posts allows you to list posts (from any post type) anywhere on your site. This includes WooCommerce products or any other post type you might have! Check out the pro version for even more features at https://wpshowposts.com.
6
- Version: 0.1
7
  Author: Tom Usborne
8
  Author URI: https://tomusborne.com
9
  License: GNU General Public License v2 or later
@@ -12,7 +12,7 @@ Text Domain: wp-show-posts
12
  */
13
 
14
  // Define the current version
15
- define( 'WPSP_VERSION', 0.1 );
16
 
17
  // Add defaults
18
  require_once trailingslashit( plugin_dir_path( __FILE__ ) ) . 'inc/defaults.php';
@@ -347,7 +347,7 @@ function wpsp_display( $id )
347
  </div><!-- .entry-summary -->
348
  <?php elseif ( 'full' == $content_type ) : ?>
349
  <div class="wp-show-posts-entry-content" itemprop="text">
350
- <?php the_content(); ?>
351
  </div><!-- .entry-content -->
352
  <?php endif;
353
 
@@ -415,9 +415,11 @@ function wpsp_shortcode_function( $atts , $content = null ) {
415
  'id' => '',
416
  ), $atts, 'wp_show_posts'
417
  );
 
 
418
  if ( $atts[ 'id' ] )
419
- return wpsp_display( $atts[ 'id' ] );
420
- else
421
- return false;
422
  }
423
  endif;
3
  Plugin Name: WP Show Posts
4
  Plugin URI: https://wpshowposts.com
5
  Description: WP Show Posts allows you to list posts (from any post type) anywhere on your site. This includes WooCommerce products or any other post type you might have! Check out the pro version for even more features at https://wpshowposts.com.
6
+ Version: 0.2
7
  Author: Tom Usborne
8
  Author URI: https://tomusborne.com
9
  License: GNU General Public License v2 or later
12
  */
13
 
14
  // Define the current version
15
+ define( 'WPSP_VERSION', 0.2 );
16
 
17
  // Add defaults
18
  require_once trailingslashit( plugin_dir_path( __FILE__ ) ) . 'inc/defaults.php';
347
  </div><!-- .entry-summary -->
348
  <?php elseif ( 'full' == $content_type ) : ?>
349
  <div class="wp-show-posts-entry-content" itemprop="text">
350
+ <?php the_content( false, false ); ?>
351
  </div><!-- .entry-content -->
352
  <?php endif;
353
 
415
  'id' => '',
416
  ), $atts, 'wp_show_posts'
417
  );
418
+ ob_start();
419
+
420
  if ( $atts[ 'id' ] )
421
+ wpsp_display( $atts[ 'id' ] );
422
+
423
+ return ob_get_clean();
424
  }
425
  endif;