Skip to content

Latest commit

 

History

History
125 lines (94 loc) · 4.07 KB

FAQ.md

File metadata and controls

125 lines (94 loc) · 4.07 KB

Frequently Asked Questions

How can I remove the hyperlink of the title of the post?

Add link_titles=false to your shortcode.

How do I display the Thumbnail next to the title?

To see the thumbnail next to the title, you can add a class to it like this:

[catlist id=1 thumbnail=yes thumbnail_class=lcp_thumbnail]

Then in your theme's stylesheet add this code:

.lcp_thumbnail{
  float: left;
}

.lcp_catlist li{
  clear: both;
}

If you want the thumbnail to the right, just change the float: left attribute to float: right.

How to not display the title

Add no_post_titles=yes to your shortcode.

How to insert the shortcode on the theme and not a post or page

You can use this code on your theme (sidebar, footer, or wherever you like): <?php echo do_shortcode("[catlist id=3]"); ?>

How to display lists in columns

You don't need a template for this. You can write something like this when editing your page/post (in the "Text" text-editor):

<table>
  <tr>
    <td>
    [catlist id=3 numberposts=5 excludeposts=this]
    </td>
    <td>
    [catlist id=3 numberposts=5 excludeposts=this offset=5]
    </td>
  </tr>
</table>

The offset should equal the number of posts (numberposts) times the number of column - 1. So if you had a third column, the code would look like this:

<table>
  <tr>
    <td>
    [catlist id=3 numberposts=5 excludeposts=this]
    </td>
    <td>
    [catlist id=3 numberposts=5 excludeposts=this offset=5]
    </td>
    <td>
    [catlist id=3 numberposts=5 excludeposts=this offset=10]
    </td>
  </tr>
</table>

How can I use the shortcode in a Widget?

Since WordPress 4.9, you can use a shortcode in a widget. If you’re using a previous WordPress version, add this code to your theme’s functions.php file:

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:

.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 if you're using PHP 4.

Plugin could not be activated because it triggered a fatal error

Something like this:

Parse error: syntax error, unexpected T_STRING, expecting
T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in
/.../wp-content/plugins/list-category-posts/include/CatListDisplayer.php
on line 10*

It's probably due to the webhost using PHP 4. CatListDisplayer.php declares private attributes. PHP 4 doesn't have public, private or protected accessors. Try updating your server or using an older version.

Please check: http://wordpress.stackexchange.com/questions/9338/list-category-posts-plugin-upgrade-fails-fatal-error/9340#9340