Version Description
- Bugfix release, fixes current category for post/page
Download this release
Release Info
Developer | fernandobt |
Plugin | List category posts |
Version | 0.30.3 |
Comparing to | |
See all releases |
Code changes from version 0.30.2 to 0.30.3
- include/CatList.php +6 -2
- list_cat_posts.php +1 -1
- readme.txt +4 -1
include/CatList.php
CHANGED
@@ -169,8 +169,12 @@ class CatList{
|
|
169 |
}
|
170 |
|
171 |
public function lcp_get_current_category(){
|
172 |
-
|
173 |
-
$category
|
|
|
|
|
|
|
|
|
174 |
return $category->cat_ID;
|
175 |
}
|
176 |
|
169 |
}
|
170 |
|
171 |
public function lcp_get_current_category(){
|
172 |
+
$category = get_category( get_query_var( 'category' ) );
|
173 |
+
if(isset($category->errors) && $category->errors["invalid_term"][0] == "Empty Term"):
|
174 |
+
global $post;
|
175 |
+
$categories = get_the_category($post->ID);
|
176 |
+
return $categories[0]->cat_ID;
|
177 |
+
endif;
|
178 |
return $category->cat_ID;
|
179 |
}
|
180 |
|
list_cat_posts.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: List category posts
|
4 |
Plugin URI: https://github.com/picandocodigo/List-Category-Posts
|
5 |
Description: List Category Posts allows you to list posts from a category into a post/page using the [catlist] shortcode. This shortcode accepts a category name or id, the order in which you want the posts to display, and the number of posts to display. You can use [catlist] as many times as needed with different arguments. Usage: [catlist argument1=value1 argument2=value2].
|
6 |
-
Version: 0.30.
|
7 |
Author: Fernando Briano
|
8 |
Author URI: http://picandocodigo.net/
|
9 |
|
3 |
Plugin Name: List category posts
|
4 |
Plugin URI: https://github.com/picandocodigo/List-Category-Posts
|
5 |
Description: List Category Posts allows you to list posts from a category into a post/page using the [catlist] shortcode. This shortcode accepts a category name or id, the order in which you want the posts to display, and the number of posts to display. You can use [catlist] as many times as needed with different arguments. Usage: [catlist argument1=value1 argument2=value2].
|
6 |
+
Version: 0.30.3
|
7 |
Author: Fernando Briano
|
8 |
Author URI: http://picandocodigo.net/
|
9 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate Link: http://picandocodigo.net/programacion/wordpress/list-category-posts
|
|
4 |
Tags: list, categories, posts, cms
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 3.5
|
7 |
-
Stable tag: 0.30.
|
8 |
|
9 |
== Description ==
|
10 |
List Category Posts allows you to list posts from a category into a post/page using the [catlist] shortcode. When you're editing a page or post, directly insert the shortcode in your text and the posts will be listed there. The **basic** usage would be something like this:
|
@@ -245,6 +245,9 @@ Template system has changed. Custom templates should be stored in WordPress them
|
|
245 |
|
246 |
== Changelog ==
|
247 |
|
|
|
|
|
|
|
248 |
= 0.30.2 =
|
249 |
* Improves 'current category' detection.
|
250 |
* Adds categorypage parameter to widget
|
4 |
Tags: list, categories, posts, cms
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 3.5
|
7 |
+
Stable tag: 0.30.3
|
8 |
|
9 |
== Description ==
|
10 |
List Category Posts allows you to list posts from a category into a post/page using the [catlist] shortcode. When you're editing a page or post, directly insert the shortcode in your text and the posts will be listed there. The **basic** usage would be something like this:
|
245 |
|
246 |
== Changelog ==
|
247 |
|
248 |
+
= 0.30.3 =
|
249 |
+
* Bugfix release, fixes current category for post/page
|
250 |
+
|
251 |
= 0.30.2 =
|
252 |
* Improves 'current category' detection.
|
253 |
* Adds categorypage parameter to widget
|