i need the same! any help?
Hi pabbot & narcopastello,
You will have to go to the following link –
https://wordpress.org/plugins/list-category-posts/other_notes/
Scroll to the bottom of the page to Template System, and follow the instructions given there.
Basically you will have to create a template and rearrange the code used to display the post content. For more info, check these links –
https://wordpress.org/support/topic/plugin-list-category-posts-template-system-how-to-add-a-read-more-link-to-each-post
https://wordpress.org/support/topic/plugin-list-category-posts-how-to-use-the-template
Hope this helps!
But don’t upgrade to WordPress 4.1, as the plugin’s shortcode might stop working. You can still use the widgets, though, but it will mean less functionality.
I tested the 0.51 version of list category posts with WP 4.1 with several different themes and the [catlist] code appears where there should have been posts, so the code isn’t processed. An older version of the plugin worked normally with WP 4.1.
To be a bit more precise. Here’s what I did to change the date to be in front of the title using a custom template file:
step1: Copy the template file: “default.php” from the plugin directory and paste it in a new folder in your (child)theme directory called: “list-catergory-posts.”
step2: Rename the file to a proper name for your template. something like: “mylist.php”
step3: Edit this file like this:
Change the third line to your filename (not sure if this is needed?)
Plugin Name: List Category Posts - Template "mylist"
Change the foreach loop on line 55 to something like you want:
I wanted to have the date in front of the posttitle so i did this:
foreach ($this->catlist->get_categories_posts() as $single){
//Start a List Item for each post:
$lcp_display_output .= "<li>";
//Show date:
$lcp_display_output .= $this->get_date($single, 'span', 'lcp_date');
//Show the title and link to the post:
$lcp_display_output .= ' - ' . $this->get_post_title($single, 'a', 'lcp_post');
Here I’ve changed the “show date part” to be higher up, before the title
Also changed the html attribuut to be a “span” tag and added a class name “lcp-date” to the date. Also remove the extra space in front of the date.
Then for the title I added an extra dash ” – ” in between the date and the title and changed the html attribuut to be an “a-tag”. Also added a different class: “lcp_post” so I can target it with css later.
Then I added this shortcode to my page:
[catlist template=mylist name=nieuws numberposts=5 date=yes dateformat="d-m-Y"]
Cheers Richard
created a template as instructed but ul’s are still being displayed dispite my template using table’s :/