diff --git a/doc/FAQ.md b/doc/FAQ.md index 548d24b..f75a663 100644 --- a/doc/FAQ.md +++ b/doc/FAQ.md @@ -6,6 +6,7 @@ * [How to display lists in columns](#columns) * [How do I display the Thumbnail next to the title?](#thumbnail) * [How to not display the title](#no-title) + * [How do I remove the bullets from the list?](#bullets) * [The plugin doesn't work on servers with PHP < 5](#php4) * [Plugin could not be activated because it triggered a fatal error](#fatal-error) @@ -116,6 +117,18 @@ add_filter('widget_text', 'do_shortcode'); Then just add a new text widget to your blog and use the shortcode there as the widget's content. +##How do I remove the bullets from the list? + +By default the posts will be displayed inside a ul tag with the +`lcp_catlist` CSS class. So to make the bullets disappear, just add +this CSS code to your theme's stylesheet: + +```css +.lcp_catlist li{ + list-style: none; +} +``` + ##Does not work on servers with PHP < 5 This is true since version 0.18. If you're still using PHP 4 on your webhost, you should consider upgrading to PHP 5. WordPress 3.1 was the last version to support PHP 4, from 3.2 and forward, only PHP 5 is supported. You can still [download an older version of the plugin](https://wordpress.org/extend/plugins/list-category-posts/download/ "download an older version of the plugin") if you're using PHP 4. diff --git a/include/CatList.php b/include/CatList.php index 5b9b43f..bf4f4df 100644 --- a/include/CatList.php +++ b/include/CatList.php @@ -419,9 +419,17 @@ public function get_comments_count($single){ } public function get_author_to_show($single){ - if ($this->params['author']=='yes'): + if ($this->params['author'] == 'yes'): $lcp_userdata = get_userdata($single->post_author); - return $lcp_userdata->display_name; + $author_name = $lcp_userdata->display_name; + if($this->lcp_not_empty('author_posts_link') && + $this->params['author_posts_link'] == 'yes'){ + $link = get_author_posts_url($lcp_userdata->ID); + return "" . $author_name . ""; + } else { + return $author_name; + } else: return null; endif; diff --git a/list_cat_posts.php b/list_cat_posts.php index 0dbcf81..c2ff8ab 100644 --- a/list_cat_posts.php +++ b/list_cat_posts.php @@ -54,6 +54,7 @@ static function catlist_func($atts, $content = null) { 'date_modified_tag' => '', 'date_modified_class' => '', 'author' => 'no', + 'author_posts_link' => 'no', 'author_tag' =>'', 'author_class' => '', 'author_posts' => '', diff --git a/readme.txt b/readme.txt index f779fa1..48ad38c 100644 --- a/readme.txt +++ b/readme.txt @@ -195,6 +195,13 @@ update the plugin. tag to wrap the author name in with `author_class` and `author_tag` (see HTML & CSS Customization further below). + When displaying the post author, you can also display a link to the + author's page. The following parameter **only works if author=yes + is present in the shortcode**: + + * **author_posts_link** - Gets the URL of the author page for the + author. The HTML and CSS customization are the ones applied to `author`. + * **dateformat** - Format of the date output. The default format is the one you've set on your WordPress settings. Example: `[catlist id=42 dateformat="l F dS, Y"]` would display the date as "Monday January 21st, 2013". Check http://codex.wordpress.org/Formatting_Date_and_Time for more options to display date. * **excerpt** - Display the post's excerpt. Default is 'no', use `excerpt=yes` to activate it. If you don't have an excerpt in your post, the plugin will fetch this text from the content, striping its images, shortcodes and HTML tags. The limit is set by the *excerpt_size* parameter (55 words by default). If you want the automatically generated excerpt to respect your theme's allowed HTML tags, you should use `excerpt_strip=no`. If the post has an excerpt, the HTML tags are automatically stripped. If you want to overwrite the post's excerpt with an automatically generated one (may be usefull to allow HTML tags), use `excerpt_overwrite=yes`. I added this last parameter to have consistency across excerpts. @@ -414,7 +421,8 @@ Template system has changed. Custom templates should be stored in WordPress them = 0.49 = -* Adds catname parameter to show just the category name (and not the link). Thanks user sirenAri from the [forum](http://wordpress.org/support/topic/a-couple-of-suggestions-and-one-teensy-error) +* Adds `author_posts_link`, to show an author's page. +* Adds catname parameter to show just the category name (and not the link). Thanks user sirenAri from the [forum](http://wordpress.org/support/topic/a-couple-of-suggestions-and-one-teensy-error). * Small bug fix for getting current category. Used to check against simple string, now checking against i18n'ed one. = 0.48 =