WP News and Scrolling Widgets - Version 2.2.1

Version Description

  • fixed the bug : Shows news on top of static page
Download this release

Release Info

Developer anoopranawat
Plugin Icon 128x128 WP News and Scrolling Widgets
Version 2.2.1
Comparing to
See all releases

Code changes from version 2.2 to 2.2.1

Files changed (2) hide show
  1. readme.txt +21 -14
  2. sp-news-and-widget.php +5 -18
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: sptechnolab, anoopranawat
3
  Tags: wordpress news plugin, main news page scrolling , wordpress vertical news plugin widget, wordpress horizontal news plugin widget , Free scrolling news wordpress plugin, Free scrolling news widget wordpress plugin, WordPress set post or page as news, WordPress dynamic news, news, latest news, custom post type, cpt, widget, vertical news scrolling widget, news widget
4
  Requires at least: 3.1
5
- Tested up to: 3.9.1
6
  Author URI: http://www.sptechnolab.com
7
  Stable tag: trunk
8
  License: GPLv2 or later
@@ -12,20 +12,21 @@ A quick, easy way to add an News custom post type, News widget, vertical and hor
12
 
13
  == Description ==
14
 
15
- Every CMS site needs a news section. SP News allows you add, manage and display news, date archives, widget, vertical and horizontal news scrolling widget.
16
 
17
- View [DEMO](http://wordpushplugins.in/latestnews/) for additional information.
18
  View [screenshots](http://wordpress.org/plugins/sp-news-and-widget/screenshots/) for additional information.
19
 
20
- =Important Note For How to Install =
21
-
22
- *Please make sure that Permalink link should not be "/news" Otherwise all your news will go to archive page. You can give it other name like "/ournews, /latestnews etc"
23
-
24
- *Now you can Display news post with the help of short code <code> [sp_news] </code>
25
-
26
- *Also you can Display the news post with category wise <code> Sports news [sp_news category=category_id] </code>
27
-
28
- *Also you can Display the news post with Multiple category wise
 
 
29
  <code> Sports news
30
  [sp_news category=category_id]
31
 
@@ -33,9 +34,9 @@ Arts news
33
  [sp_news category=category_id]
34
  </code>
35
 
36
- *Comments for the news
37
 
38
- *Users that are using version 2.1 please paste the shortcode in their News page <code> [sp_news] </code> and If your Permalink link is www.yourdoamin.com/news then plaese change to "news" to other name otherwise all your news will go to archive page.
39
 
40
  This plugin add a News custom post type, News widget, vertical and horizontal news scrolling widget( With setting page 'setting -> News Widget Setting') to your Wordpress site.
41
 
@@ -104,6 +105,9 @@ Yse <code> [sp_news] </code>.
104
 
105
  == Changelog ==
106
 
 
 
 
107
 
108
  = 2.2 =
109
  * Call the news post with shortcode
@@ -131,6 +135,9 @@ Yse <code> [sp_news] </code>.
131
 
132
  == Upgrade Notice ==
133
 
 
 
 
134
  = 2.2 =
135
  * Call the news post with shortcode
136
  * Call the news post with category wise
2
  Contributors: sptechnolab, anoopranawat
3
  Tags: wordpress news plugin, main news page scrolling , wordpress vertical news plugin widget, wordpress horizontal news plugin widget , Free scrolling news wordpress plugin, Free scrolling news widget wordpress plugin, WordPress set post or page as news, WordPress dynamic news, news, latest news, custom post type, cpt, widget, vertical news scrolling widget, news widget
4
  Requires at least: 3.1
5
+ Tested up to: 4.1
6
  Author URI: http://www.sptechnolab.com
7
  Stable tag: trunk
8
  License: GPLv2 or later
12
 
13
  == Description ==
14
 
15
+ Every CMS site needs a news section. SP News allows you add, manage and display news, date archives, widget, vertical and horizontal news scrolling widget on your website.
16
 
 
17
  View [screenshots](http://wordpress.org/plugins/sp-news-and-widget/screenshots/) for additional information.
18
 
19
+ = Installation help and support =
20
+ * Please check [installation help](http://wponlinesupport.com/plugin-installation-support/) on our website. View [Installation help and support](http://wponlinesupport.com/plugin-installation-support/)
21
+ * Get [Free installation and setup](http://wponlinesupport.com/plugin-installation-support/) on your website.
22
+
23
+ = Important Note For How to Install =
24
+ * Please make sure that Permalink link should not be "/news" Otherwise all your news will go to archive page. You can give it other name like "/ournews, /latestnews etc"
25
+ * Now you can Display news post with the help of short code
26
+ <code> [sp_news] </code>
27
+ * Also you can Display the news post with category wise
28
+ <code> Sports news [sp_news category=category_id] </code>
29
+ * Also you can Display the news post with Multiple category wise
30
  <code> Sports news
31
  [sp_news category=category_id]
32
 
34
  [sp_news category=category_id]
35
  </code>
36
 
37
+ * Comments for the news
38
 
39
+ * Users that are using version 2.1 please paste the shortcode in their News page <code> [sp_news] </code> and If your Permalink link is www.yourdoamin.com/news then plaese change to "news" to other name like "ournews", "latestnews etc" otherwise all your news will go to archive page.
40
 
41
  This plugin add a News custom post type, News widget, vertical and horizontal news scrolling widget( With setting page 'setting -> News Widget Setting') to your Wordpress site.
42
 
105
 
106
  == Changelog ==
107
 
108
+ = 2.2.1 =
109
+ * fixed the bug : Shows news on top of static page
110
+
111
 
112
  = 2.2 =
113
  * Call the news post with shortcode
135
 
136
  == Upgrade Notice ==
137
 
138
+ = 2.2.1 =
139
+ * fixed the bug : Shows news on top of static page
140
+
141
  = 2.2 =
142
  * Call the news post with shortcode
143
  * Call the news post with category wise
sp-news-and-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: SP News and three widgets(static, scrolling and scrolling with thumbs)
4
  Plugin URL: http://sptechnolab.com
5
  Description: A simple News and three widgets(static, scrolling and scrolling with thumbs) plugin
6
- Version: 2.2
7
  Author: SP Technolab
8
  Author URI: http://www.sptechnolab.com
9
  Contributors: SP Technolab
@@ -48,7 +48,7 @@ function sp_cpt_news_init() {
48
  'hierarchical' => false,
49
  'menu_position' => 8,
50
  'menu_icon' => plugins_url( 'images/newspaper-add-icon.png', __FILE__ ),
51
- 'supports' => array('title','editor','thumbnail','excerpt'),
52
  'taxonomies' => array('category', 'post_tag')
53
  );
54
  register_post_type('news',$news_args);
@@ -296,27 +296,20 @@ function get_news( $atts, $content = null ){
296
  // setup the query
297
  extract(shortcode_atts(array(
298
  "limit" => '',
299
- "category" => '',
300
- "comment_status" => ''
301
  ), $atts));
302
- if( $comment_status == 'open' ) {
303
- $com = 'open';
304
- } else {
305
- $com = 'closed';
306
- }
307
  // Define limit
308
  if( $limit ) {
309
  $posts_per_page = $limit;
310
  } else {
311
  $posts_per_page = '-1';
312
  }
313
- update_option( 'default_comment_status', $com );
314
  if( $category ) {
315
  $cat = $category;
316
  } else {
317
  $cat = '';
318
  }
319
-
320
  $news_args = array( 'suppress_filters' => true,
321
  'posts_per_page' => $posts_per_page,
322
  'post_type' => 'news',
@@ -335,13 +328,7 @@ function get_news( $atts, $content = null ){
335
  endif;
336
  wp_reset_query();
337
 
338
-
339
- $status = get_option('default_comment_status');
340
- if($status == 'open'){
341
- comments_template();
342
- }else {
343
- }
344
-
345
  }
346
  add_shortcode('sp_news','get_news');
347
 
3
  Plugin Name: SP News and three widgets(static, scrolling and scrolling with thumbs)
4
  Plugin URL: http://sptechnolab.com
5
  Description: A simple News and three widgets(static, scrolling and scrolling with thumbs) plugin
6
+ Version: 2.2.1
7
  Author: SP Technolab
8
  Author URI: http://www.sptechnolab.com
9
  Contributors: SP Technolab
48
  'hierarchical' => false,
49
  'menu_position' => 8,
50
  'menu_icon' => plugins_url( 'images/newspaper-add-icon.png', __FILE__ ),
51
+ 'supports' => array('title','editor','thumbnail','excerpt','comments'),
52
  'taxonomies' => array('category', 'post_tag')
53
  );
54
  register_post_type('news',$news_args);
296
  // setup the query
297
  extract(shortcode_atts(array(
298
  "limit" => '',
299
+ "category" => ''
 
300
  ), $atts));
 
 
 
 
 
301
  // Define limit
302
  if( $limit ) {
303
  $posts_per_page = $limit;
304
  } else {
305
  $posts_per_page = '-1';
306
  }
 
307
  if( $category ) {
308
  $cat = $category;
309
  } else {
310
  $cat = '';
311
  }
312
+ ob_start();
313
  $news_args = array( 'suppress_filters' => true,
314
  'posts_per_page' => $posts_per_page,
315
  'post_type' => 'news',
328
  endif;
329
  wp_reset_query();
330
 
331
+ return ob_get_clean();
 
 
 
 
 
 
332
  }
333
  add_shortcode('sp_news','get_news');
334