Version Description
- Bug fixes
- Adds parameter to show modified date of posts. Thanks Eric Sandine for the Pull Request :)
Download this release
Release Info
Developer | fernandobt |
Plugin | List category posts |
Version | 0.48 |
Comparing to | |
See all releases |
Code changes from version 0.47 to 0.48
- include/CatList.php +67 -41
- include/CatListDisplayer.php +19 -2
- include/ListCategoryPostsWidget.php +3 -0
- include/lcp_widget_form.php +8 -0
- include/options.php +2 -2
- list_cat_posts.php +4 -1
- readme.txt +25 -8
include/CatList.php
CHANGED
@@ -7,7 +7,6 @@
|
|
7 |
class CatList{
|
8 |
private $params = array();
|
9 |
private $lcp_category_id = 0;
|
10 |
-
private $category_param;
|
11 |
private $exclude;
|
12 |
private $page = 1;
|
13 |
private $posts_count = 0;
|
@@ -37,12 +36,7 @@ class CatList{
|
|
37 |
* Order the parameters and query the DB for posts
|
38 |
*/
|
39 |
private function set_lcp_parameters(){
|
40 |
-
|
41 |
-
$args = array('category__and' => $this->lcp_category_id);
|
42 |
-
else:
|
43 |
-
$args = array('cat'=> $this->lcp_category_id);
|
44 |
-
endif;
|
45 |
-
|
46 |
$args = array_merge($args, array(
|
47 |
'numberposts' => $this->params['numberposts'],
|
48 |
'orderby' => $this->params['orderby'],
|
@@ -50,37 +44,11 @@ class CatList{
|
|
50 |
'offset' => $this->params['offset']
|
51 |
));
|
52 |
|
53 |
-
//
|
54 |
-
|
55 |
-
$exclude = array(
|
56 |
-
'post__not_in' => explode(",", $this->params['excludeposts'])
|
57 |
-
);
|
58 |
-
if (strpos($this->params['excludeposts'], 'this') > -1) :
|
59 |
-
$exclude = array_merge(
|
60 |
-
$exclude,
|
61 |
-
array('post__not_in' => array(
|
62 |
-
$this->lcp_get_current_post_id()
|
63 |
-
)
|
64 |
-
)
|
65 |
-
);
|
66 |
-
endif;
|
67 |
-
$args = array_merge($args, $exclude);
|
68 |
-
endif;
|
69 |
-
|
70 |
-
// Post type, status, parent params:
|
71 |
-
if($this->lcp_not_empty('post_type')):
|
72 |
-
$args['post_type'] = $this->params['post_type'];
|
73 |
-
endif;
|
74 |
-
|
75 |
-
if($this->lcp_not_empty('post_status')):
|
76 |
-
$args['post_status'] = array(
|
77 |
-
$this->params['post_status']
|
78 |
-
);
|
79 |
-
endif;
|
80 |
|
81 |
-
|
82 |
-
|
83 |
-
endif;
|
84 |
|
85 |
if($this->lcp_not_empty('year')):
|
86 |
$args['year'] = $this->params['year'];
|
@@ -171,10 +139,10 @@ class CatList{
|
|
171 |
// http://core.trac.wordpress.org/browser/tags/3.7.1/src/wp-includes/post.php#L1686
|
172 |
$args['posts_per_page'] = $args['numberposts'];
|
173 |
|
174 |
-
remove_all_filters('posts_orderby');
|
175 |
$query = new WP_Query;
|
176 |
$this->lcp_categories_posts = $query->query($args);
|
177 |
$this->posts_count = $query->found_posts;
|
|
|
178 |
remove_all_filters('posts_where');
|
179 |
}
|
180 |
|
@@ -191,6 +159,58 @@ class CatList{
|
|
191 |
experience if I returned an empty list in certain cases.
|
192 |
private function lcp_should_return_posts() */
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
private function lcp_not_empty($param){
|
195 |
return (
|
196 |
isset($this->params[$param]) &&
|
@@ -200,13 +220,11 @@ class CatList{
|
|
200 |
);
|
201 |
}
|
202 |
|
203 |
-
|
204 |
private function lcp_get_current_post_id(){
|
205 |
global $post;
|
206 |
return $post->ID;
|
207 |
}
|
208 |
|
209 |
-
|
210 |
private function get_lcp_category(){
|
211 |
if ( $this->lcp_not_empty('categorypage') &&
|
212 |
$this->params['categorypage'] == 'yes' ||
|
@@ -416,7 +434,7 @@ class CatList{
|
|
416 |
}
|
417 |
|
418 |
public function get_date_to_show($single){
|
419 |
-
if ($this->params['date']=='yes'):
|
420 |
//by Verex, great idea!
|
421 |
return get_the_time($this->params['dateformat'], $single);
|
422 |
else:
|
@@ -424,6 +442,14 @@ class CatList{
|
|
424 |
endif;
|
425 |
}
|
426 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
427 |
public function get_content($single){
|
428 |
if (isset($this->params['content']) &&
|
429 |
$this->params['content'] =='yes' &&
|
7 |
class CatList{
|
8 |
private $params = array();
|
9 |
private $lcp_category_id = 0;
|
|
|
10 |
private $exclude;
|
11 |
private $page = 1;
|
12 |
private $posts_count = 0;
|
36 |
* Order the parameters and query the DB for posts
|
37 |
*/
|
38 |
private function set_lcp_parameters(){
|
39 |
+
$args = $this->lcp_categories();
|
|
|
|
|
|
|
|
|
|
|
40 |
$args = array_merge($args, array(
|
41 |
'numberposts' => $this->params['numberposts'],
|
42 |
'orderby' => $this->params['orderby'],
|
44 |
'offset' => $this->params['offset']
|
45 |
));
|
46 |
|
47 |
+
// Check posts to exclude
|
48 |
+
$args = $this->lcp_check_excludes($args);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
+
// Check type, status, parent params
|
51 |
+
$args = $this->lcp_types_and_statuses($args);
|
|
|
52 |
|
53 |
if($this->lcp_not_empty('year')):
|
54 |
$args['year'] = $this->params['year'];
|
139 |
// http://core.trac.wordpress.org/browser/tags/3.7.1/src/wp-includes/post.php#L1686
|
140 |
$args['posts_per_page'] = $args['numberposts'];
|
141 |
|
|
|
142 |
$query = new WP_Query;
|
143 |
$this->lcp_categories_posts = $query->query($args);
|
144 |
$this->posts_count = $query->found_posts;
|
145 |
+
remove_all_filters('posts_orderby');
|
146 |
remove_all_filters('posts_where');
|
147 |
}
|
148 |
|
159 |
experience if I returned an empty list in certain cases.
|
160 |
private function lcp_should_return_posts() */
|
161 |
|
162 |
+
/** HELPER FUNCTIONS **/
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Check if there's one or more categories.
|
166 |
+
* Used in the beginning when setting up the parameters.
|
167 |
+
*/
|
168 |
+
private function lcp_categories(){
|
169 |
+
if (is_array($this->lcp_category_id)):
|
170 |
+
return array('category__and' => $this->lcp_category_id);
|
171 |
+
else:
|
172 |
+
return array('cat'=> $this->lcp_category_id);
|
173 |
+
endif;
|
174 |
+
}
|
175 |
+
|
176 |
+
// Check posts to exclude
|
177 |
+
private function lcp_check_excludes($args){
|
178 |
+
if( $this->lcp_not_empty('excludeposts') ){
|
179 |
+
$exclude = array(
|
180 |
+
'post__not_in' => explode(",", $this->params['excludeposts'])
|
181 |
+
);
|
182 |
+
if (strpos($this->params['excludeposts'], 'this') > -1){
|
183 |
+
$exclude = array_merge(
|
184 |
+
$exclude,
|
185 |
+
array('post__not_in' => array($this->lcp_get_current_post_id() ) )
|
186 |
+
);
|
187 |
+
}
|
188 |
+
$args = array_merge($args, $exclude);
|
189 |
+
}
|
190 |
+
return $args;
|
191 |
+
}
|
192 |
+
|
193 |
+
private function lcp_types_and_statuses($args){
|
194 |
+
// Post type, status, parent params:
|
195 |
+
if($this->lcp_not_empty('post_type')):
|
196 |
+
$args['post_type'] = $this->params['post_type'];
|
197 |
+
endif;
|
198 |
+
|
199 |
+
if($this->lcp_not_empty('post_status')):
|
200 |
+
$args['post_status'] = array(
|
201 |
+
$this->params['post_status']
|
202 |
+
);
|
203 |
+
endif;
|
204 |
+
|
205 |
+
if($this->lcp_not_empty('post_parent')):
|
206 |
+
$args['post_parent'] = $this->params['post_parent'];
|
207 |
+
endif;
|
208 |
+
return $args;
|
209 |
+
}
|
210 |
+
|
211 |
+
/**
|
212 |
+
* Check for empty parameters (being empty strings or zero).
|
213 |
+
*/
|
214 |
private function lcp_not_empty($param){
|
215 |
return (
|
216 |
isset($this->params[$param]) &&
|
220 |
);
|
221 |
}
|
222 |
|
|
|
223 |
private function lcp_get_current_post_id(){
|
224 |
global $post;
|
225 |
return $post->ID;
|
226 |
}
|
227 |
|
|
|
228 |
private function get_lcp_category(){
|
229 |
if ( $this->lcp_not_empty('categorypage') &&
|
230 |
$this->params['categorypage'] == 'yes' ||
|
434 |
}
|
435 |
|
436 |
public function get_date_to_show($single){
|
437 |
+
if ($this->params['date'] == 'yes'):
|
438 |
//by Verex, great idea!
|
439 |
return get_the_time($this->params['dateformat'], $single);
|
440 |
else:
|
442 |
endif;
|
443 |
}
|
444 |
|
445 |
+
public function get_modified_date_to_show($single){
|
446 |
+
if ($this->params['date_modified'] == 'yes'):
|
447 |
+
return get_the_modified_time($this->params['dateformat'], $single);
|
448 |
+
else:
|
449 |
+
return null;
|
450 |
+
endif;
|
451 |
+
}
|
452 |
+
|
453 |
public function get_content($single){
|
454 |
if (isset($this->params['content']) &&
|
455 |
$this->params['content'] =='yes' &&
|
include/CatListDisplayer.php
CHANGED
@@ -117,9 +117,12 @@ class CatListDisplayer {
|
|
117 |
$pag_output = '';
|
118 |
if (!empty($this->params['pagination']) && $this->params['pagination'] == "yes"):
|
119 |
$lcp_paginator = '';
|
|
|
120 |
$pages_count = ceil (
|
121 |
-
|
122 |
-
|
|
|
|
|
123 |
if ($pages_count > 1){
|
124 |
for($i = 1; $i <= $pages_count; $i++){
|
125 |
$lcp_paginator .= $this->lcp_page_link($i);
|
@@ -210,6 +213,15 @@ class CatListDisplayer {
|
|
210 |
$lcp_display_output .= $this->get_date($single);
|
211 |
endif;
|
212 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
213 |
// Author
|
214 |
if (!empty($this->params['author_tag'])):
|
215 |
if (!empty($this->params['author_class'])):
|
@@ -323,6 +335,11 @@ class CatListDisplayer {
|
|
323 |
return $this->assign_style($info, $tag, $css_class);
|
324 |
}
|
325 |
|
|
|
|
|
|
|
|
|
|
|
326 |
private function get_excerpt($single, $tag = null, $css_class = null){
|
327 |
$info = $this->catlist->get_excerpt($single);
|
328 |
$info = preg_replace('/\[.*\]/', '', $info);
|
117 |
$pag_output = '';
|
118 |
if (!empty($this->params['pagination']) && $this->params['pagination'] == "yes"):
|
119 |
$lcp_paginator = '';
|
120 |
+
$number_posts = $this->catlist->get_number_posts();
|
121 |
$pages_count = ceil (
|
122 |
+
$this->catlist->get_posts_count() /
|
123 |
+
# Avoid dividing by 0 (pointed out by @rhj4)
|
124 |
+
max( array( 1, $number_posts ) )
|
125 |
+
);
|
126 |
if ($pages_count > 1){
|
127 |
for($i = 1; $i <= $pages_count; $i++){
|
128 |
$lcp_paginator .= $this->lcp_page_link($i);
|
213 |
$lcp_display_output .= $this->get_date($single);
|
214 |
endif;
|
215 |
|
216 |
+
// Date Modified
|
217 |
+
if (!empty($this->params['date_modified_tag']) || !empty($this->params['date_modified_class'])):
|
218 |
+
$lcp_display_output .= $this->get_modified_date($single,
|
219 |
+
$this->params['date_modified_tag'],
|
220 |
+
$this->params['date_modified_class']);
|
221 |
+
else:
|
222 |
+
$lcp_display_output .= $this->get_modified_date($single);
|
223 |
+
endif;
|
224 |
+
|
225 |
// Author
|
226 |
if (!empty($this->params['author_tag'])):
|
227 |
if (!empty($this->params['author_class'])):
|
335 |
return $this->assign_style($info, $tag, $css_class);
|
336 |
}
|
337 |
|
338 |
+
private function get_modified_date($single, $tag = null, $css_class = null){
|
339 |
+
$info = " " . $this->catlist->get_modified_date_to_show($single);
|
340 |
+
return $this->assign_style($info, $tag, $css_class);
|
341 |
+
}
|
342 |
+
|
343 |
private function get_excerpt($single, $tag = null, $css_class = null){
|
344 |
$info = $this->catlist->get_excerpt($single);
|
345 |
$info = preg_replace('/\[.*\]/', '', $info);
|
include/ListCategoryPostsWidget.php
CHANGED
@@ -24,6 +24,7 @@ class ListCategoryPostsWidget extends WP_Widget{
|
|
24 |
$category_id = $instance['categoryid'];
|
25 |
$dateformat = ($instance['dateformat']) ? $instance['dateformat'] : get_option('date_format');
|
26 |
$showdate = ($instance['show_date'] == 'on') ? 'yes' : 'no';
|
|
|
27 |
$showexcerpt = ($instance['show_excerpt'] == 'on') ? 'yes' : 'no';
|
28 |
$excerptsize = (empty($instance['excerpt_size']) ? 55 : $instance['excerpt_size']);
|
29 |
$showauthor = ($instance['show_author'] == 'on') ? 'yes' : 'no';
|
@@ -38,6 +39,7 @@ class ListCategoryPostsWidget extends WP_Widget{
|
|
38 |
'order' => $order,
|
39 |
'numberposts' => $limit,
|
40 |
'date' => $showdate,
|
|
|
41 |
'author' => $showauthor,
|
42 |
'dateformat' => $dateformat,
|
43 |
'template' => 'default',
|
@@ -79,6 +81,7 @@ class ListCategoryPostsWidget extends WP_Widget{
|
|
79 |
$instance['categoryid'] = strip_tags($new_instance['categoryid']);
|
80 |
$instance['dateformat'] = strip_tags($new_instance['dateformat']);
|
81 |
$instance['show_date'] = strip_tags($new_instance['show_date']);
|
|
|
82 |
$instance['show_excerpt'] = strip_tags($new_instance['show_excerpt']);
|
83 |
$instance['excerpt_size'] = strip_tags($new_instance['excerpt_size']);
|
84 |
$instance['show_author'] = strip_tags($new_instance['show_author']);
|
24 |
$category_id = $instance['categoryid'];
|
25 |
$dateformat = ($instance['dateformat']) ? $instance['dateformat'] : get_option('date_format');
|
26 |
$showdate = ($instance['show_date'] == 'on') ? 'yes' : 'no';
|
27 |
+
$showmodifieddate = ($instance['show_modified_date'] == 'on') ? 'yes' : 'no';
|
28 |
$showexcerpt = ($instance['show_excerpt'] == 'on') ? 'yes' : 'no';
|
29 |
$excerptsize = (empty($instance['excerpt_size']) ? 55 : $instance['excerpt_size']);
|
30 |
$showauthor = ($instance['show_author'] == 'on') ? 'yes' : 'no';
|
39 |
'order' => $order,
|
40 |
'numberposts' => $limit,
|
41 |
'date' => $showdate,
|
42 |
+
'date_modified' => $showmodifieddate,
|
43 |
'author' => $showauthor,
|
44 |
'dateformat' => $dateformat,
|
45 |
'template' => 'default',
|
81 |
$instance['categoryid'] = strip_tags($new_instance['categoryid']);
|
82 |
$instance['dateformat'] = strip_tags($new_instance['dateformat']);
|
83 |
$instance['show_date'] = strip_tags($new_instance['show_date']);
|
84 |
+
$instance['show_modified_date'] = strip_tags($new_instance['show_modified_date']);
|
85 |
$instance['show_excerpt'] = strip_tags($new_instance['show_excerpt']);
|
86 |
$instance['excerpt_size'] = strip_tags($new_instance['excerpt_size']);
|
87 |
$instance['show_author'] = strip_tags($new_instance['show_author']);
|
include/lcp_widget_form.php
CHANGED
@@ -10,6 +10,7 @@
|
|
10 |
'orderby'=>'',
|
11 |
'order'=>'',
|
12 |
'show_date'=>'',
|
|
|
13 |
'show_author'=>'',
|
14 |
'show_excerpt'=>'',
|
15 |
'excerpt_size' =>'',
|
@@ -28,6 +29,7 @@
|
|
28 |
$orderby = strip_tags($instance['orderby']);
|
29 |
$order = strip_tags($instance['order']);
|
30 |
$showdate = strip_tags($instance['show_date']);
|
|
|
31 |
$showauthor = strip_tags($instance['show_author']);
|
32 |
$exclude = strip_tags($instance['exclude']);
|
33 |
$excludeposts = strip_tags($instance['excludeposts']);
|
@@ -179,6 +181,12 @@
|
|
179 |
name="<?php echo $this->get_field_name( 'show_date' ); ?>" />
|
180 |
<?php _e("Date", 'list-category-posts')?>
|
181 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
<p>
|
183 |
<input class="checkbox" input type="checkbox"
|
184 |
<?php checked( (bool) $instance['show_author'], true ); ?>
|
10 |
'orderby'=>'',
|
11 |
'order'=>'',
|
12 |
'show_date'=>'',
|
13 |
+
'show_modified_date'=>'',
|
14 |
'show_author'=>'',
|
15 |
'show_excerpt'=>'',
|
16 |
'excerpt_size' =>'',
|
29 |
$orderby = strip_tags($instance['orderby']);
|
30 |
$order = strip_tags($instance['order']);
|
31 |
$showdate = strip_tags($instance['show_date']);
|
32 |
+
$showmodifieddate = strip_tags($instance['show_modified_date']);
|
33 |
$showauthor = strip_tags($instance['show_author']);
|
34 |
$exclude = strip_tags($instance['exclude']);
|
35 |
$excludeposts = strip_tags($instance['excludeposts']);
|
181 |
name="<?php echo $this->get_field_name( 'show_date' ); ?>" />
|
182 |
<?php _e("Date", 'list-category-posts')?>
|
183 |
</p>
|
184 |
+
<p>
|
185 |
+
<input class="checkbox" type="checkbox"
|
186 |
+
<?php checked( (bool) $instance['show_modified_date'], true ); ?>
|
187 |
+
name="<?php echo $this->get_field_name( 'show_modified_date' ); ?>" />
|
188 |
+
<?php _e("Modified Date", 'list-category-posts')?>
|
189 |
+
</p>
|
190 |
<p>
|
191 |
<input class="checkbox" input type="checkbox"
|
192 |
<?php checked( (bool) $instance['show_author'], true ); ?>
|
include/options.php
CHANGED
@@ -19,7 +19,7 @@ function list_category_posts_options() {
|
|
19 |
wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
|
20 |
}
|
21 |
$numberposts = get_option('numberposts');
|
22 |
-
|
23 |
<div class="wrap">
|
24 |
<h2>List Category Posts</h2>
|
25 |
<form method="post" action="options.php">
|
@@ -60,7 +60,7 @@ function list_category_posts_options() {
|
|
60 |
support forum</a>. Make sure
|
61 |
you <a href='http://wordpress.org/extend/plugins/list-category-posts/other_notes/'>read
|
62 |
the instructions</a> to be aware of all the things you can do
|
63 |
-
with List Category Posts."); ?>
|
64 |
</em>
|
65 |
</p>
|
66 |
|
19 |
wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
|
20 |
}
|
21 |
$numberposts = get_option('numberposts');
|
22 |
+
?>
|
23 |
<div class="wrap">
|
24 |
<h2>List Category Posts</h2>
|
25 |
<form method="post" action="options.php">
|
60 |
support forum</a>. Make sure
|
61 |
you <a href='http://wordpress.org/extend/plugins/list-category-posts/other_notes/'>read
|
62 |
the instructions</a> to be aware of all the things you can do
|
63 |
+
with List Category Posts and <a href='https://github.com/picandocodigo/List-Category-Posts/blob/master/doc/FAQ.md#frequently-asked-questions'>check out the FAQ</a>."); ?>
|
64 |
</em>
|
65 |
</p>
|
66 |
|
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.
|
7 |
Author: Fernando Briano
|
8 |
Author URI: http://picandocodigo.net/
|
9 |
|
@@ -50,6 +50,9 @@ class ListCategoryPosts{
|
|
50 |
'date_tag' => '',
|
51 |
'date_class' =>'',
|
52 |
'dateformat' => get_option('date_format'),
|
|
|
|
|
|
|
53 |
'author' => 'no',
|
54 |
'author_tag' =>'',
|
55 |
'author_class' => '',
|
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.48
|
7 |
Author: Fernando Briano
|
8 |
Author URI: http://picandocodigo.net/
|
9 |
|
50 |
'date_tag' => '',
|
51 |
'date_class' =>'',
|
52 |
'dateformat' => get_option('date_format'),
|
53 |
+
'date_modified' => '',
|
54 |
+
'date_modified_tag' => '',
|
55 |
+
'date_modified_class' => '',
|
56 |
'author' => 'no',
|
57 |
'author_tag' =>'',
|
58 |
'author_class' => '',
|
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.9.1
|
7 |
-
Stable tag: 0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -29,13 +29,19 @@ list:
|
|
29 |
There's an options page which only has one option to set for the
|
30 |
plugin at the moment. But new options will be implemented on demand.
|
31 |
|
32 |
-
**Please read
|
33 |
|
34 |
-
|
|
|
|
|
|
|
|
|
35 |
|
36 |
Great to use WordPress as a CMS, and create pages with several categories posts.
|
37 |
|
38 |
-
**Widget
|
|
|
|
|
39 |
|
40 |
Please, read the information on [Other Notes](http://wordpress.org/extend/plugins/list-category-posts/other_notes/) and [Changelog](http://wordpress.org/extend/plugins/list-category-posts/changelog/) to be aware of new functionality, and improvements to the plugin.
|
41 |
|
@@ -179,6 +185,11 @@ update the plugin.
|
|
179 |
tag to wrap the date in with `date_class` and `date_tag` (see HTML
|
180 |
& CSS Customization further below).
|
181 |
|
|
|
|
|
|
|
|
|
|
|
182 |
* **author** - Display the post's author next to the title. Default is
|
183 |
'no', use author=yes to activate it. You can set a css class and an html
|
184 |
tag to wrap the author name in with `author_class` and `author_tag` (see HTML
|
@@ -312,9 +323,10 @@ The customizable elements (so far) are: author, catlink (category link), comment
|
|
312 |
|
313 |
The parameters are:
|
314 |
`autor_tag, author_class, catlink_tag, catlink_class, comments_tag,
|
315 |
-
comments_class, date_tag, date_class,
|
316 |
-
|
317 |
-
|
|
|
318 |
|
319 |
So let's say you want to wrap the displayed comments count with the p tag and a "lcp_comments" class, you would do:
|
320 |
`[catlist id=7 comments=yes comments_tag=p comments_class=lcp_comments]`
|
@@ -358,7 +370,7 @@ You can have as many different templates as you want, and use them in different
|
|
358 |
* **Instructions** on how to use the plugin: http://wordpress.org/extend/plugins/list-category-posts/other_notes/ - **Read it**.
|
359 |
* **Template system** how to customize the way the posts are shown: http://wordpress.org/extend/plugins/list-category-posts/other_notes/. I am aware the Template System is not really friendly right now, I'll work on this whenever I get the time to work on the plugin for a while.
|
360 |
* **New feature requests, Bug fixes, enhancements** - You can post them on [GitHub Issues](https://github.com/picandocodigo/List-Category-Posts/issues).
|
361 |
-
* **Questions** For questions either use the [Support forum](http://wordpress.org/support/plugin/list-category-posts) or [WordPress Answers](http://wordpress.stackexchange.com/).
|
362 |
|
363 |
|
364 |
* **FAQ**
|
@@ -398,6 +410,11 @@ Template system has changed. Custom templates should be stored in WordPress them
|
|
398 |
|
399 |
== Changelog ==
|
400 |
|
|
|
|
|
|
|
|
|
|
|
401 |
= 0.47 =
|
402 |
|
403 |
* Adds Ukranian translation by Michael Yunat [http://getvoip.com](http://getvoip.com/blog)
|
4 |
Tags: list, categories, posts, cms
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 3.9.1
|
7 |
+
Stable tag: 0.48
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
29 |
There's an options page which only has one option to set for the
|
30 |
plugin at the moment. But new options will be implemented on demand.
|
31 |
|
32 |
+
**[Please read the instructions](http://wordpress.org/extend/plugins/list-category-posts/other_notes/)** to learn what parameters are available and how to use them.
|
33 |
|
34 |
+
You can find **Frequently Asked Questions** [here](https://github.com/picandocodigo/List-Category-Posts/blob/master/doc/FAQ.md#frequently-asked-questions).
|
35 |
+
|
36 |
+
**Customization**
|
37 |
+
|
38 |
+
The different elements to display con be styled with CSS. you can define an HTML tag to wrap the element with, and a CSS class for this tag. Check [Other Notes](http://wordpress.org/extend/plugins/list-category-posts/other_notes/) for usage.
|
39 |
|
40 |
Great to use WordPress as a CMS, and create pages with several categories posts.
|
41 |
|
42 |
+
**Widget**
|
43 |
+
|
44 |
+
The plugin includes a widget which works pretty much the same as the plugin. Just add as many widgets as you want, and select all the available options from the Appearence > Widgets page.
|
45 |
|
46 |
Please, read the information on [Other Notes](http://wordpress.org/extend/plugins/list-category-posts/other_notes/) and [Changelog](http://wordpress.org/extend/plugins/list-category-posts/changelog/) to be aware of new functionality, and improvements to the plugin.
|
47 |
|
185 |
tag to wrap the date in with `date_class` and `date_tag` (see HTML
|
186 |
& CSS Customization further below).
|
187 |
|
188 |
+
* **date_modified** - Display the date a post was last modified next
|
189 |
+
to the title. You can set a css class and an html tag to wrap the
|
190 |
+
date in with `date_modified_class` and `date_modified_tag` (see
|
191 |
+
HTML & CSS Customization further below).
|
192 |
+
|
193 |
* **author** - Display the post's author next to the title. Default is
|
194 |
'no', use author=yes to activate it. You can set a css class and an html
|
195 |
tag to wrap the author name in with `author_class` and `author_tag` (see HTML
|
323 |
|
324 |
The parameters are:
|
325 |
`autor_tag, author_class, catlink_tag, catlink_class, comments_tag,
|
326 |
+
comments_class, date_tag, date_class, date_modified_tag,
|
327 |
+
date_modified_class, excerpt_tag, excerpt_class, morelink_class,
|
328 |
+
thumbnail_class, title_tag, title_class, posts_morelink_class,
|
329 |
+
customfield_tag, customfield_class`
|
330 |
|
331 |
So let's say you want to wrap the displayed comments count with the p tag and a "lcp_comments" class, you would do:
|
332 |
`[catlist id=7 comments=yes comments_tag=p comments_class=lcp_comments]`
|
370 |
* **Instructions** on how to use the plugin: http://wordpress.org/extend/plugins/list-category-posts/other_notes/ - **Read it**.
|
371 |
* **Template system** how to customize the way the posts are shown: http://wordpress.org/extend/plugins/list-category-posts/other_notes/. I am aware the Template System is not really friendly right now, I'll work on this whenever I get the time to work on the plugin for a while.
|
372 |
* **New feature requests, Bug fixes, enhancements** - You can post them on [GitHub Issues](https://github.com/picandocodigo/List-Category-Posts/issues).
|
373 |
+
* **Questions** For questions either use the [Support forum](http://wordpress.org/support/plugin/list-category-posts) or [WordPress Answers](http://wordpress.stackexchange.com/).Just [ask your question](http://wordpress.stackexchange.com/questions/ask?tags=plugin-list-category-posts) using the 'plugin-list-category-post' tag.
|
374 |
|
375 |
|
376 |
* **FAQ**
|
410 |
|
411 |
== Changelog ==
|
412 |
|
413 |
+
= 0.48 =
|
414 |
+
|
415 |
+
* Bug fixes
|
416 |
+
* Adds parameter to show modified date of posts. Thanks Eric Sandine for the Pull Request :)
|
417 |
+
|
418 |
= 0.47 =
|
419 |
|
420 |
* Adds Ukranian translation by Michael Yunat [http://getvoip.com](http://getvoip.com/blog)
|