WP 3.0.4
local installation, multisite network enabled
theme: Twentyten
plugin: List Category Posts v .15, network activated
I’ve created the folder list-category-posts
inside my theme folder, and placed default.php
inside it. Edited default.php
and saved as lcp_template_1.php
inside same folder. However, the changes are not appearing at all. I’m trying to change the style of the lcp output from the default <ul>
to <div>
classes defined in my theme (child)’s style.css
. NOT WORKING.
That is, the plugin is functioning, but the style changes are not working.
Code for my template file is up at http://wordpress.pastebin.com/EGmrkerQ
Please help. Sorry, no url for viewing the output, because this is a local installation.
Oh, btw, I should mention that in the shortcode I have called for the new template, as follows: [catlist id=1 template=lcp_template_1]
.
Hey you just opened the plugin’s tag on WordPress Answers 😀
Can you paste the code of the generated html? From what you describe, you are using it correctly, so I just want to see if the template is being loaded to detect if the problem is on the template side, or a bug on the plugin’s code.
UPDATE: Ok, I checked your template on a new WordPress install. It was getting the template, but there was some code error, here’s what worked for me:
I created the list-category-posts folder under wp-content/themes/twentyten and added a new php file called “lcp_template_1.php” with your code. Then created a new post with:
Now, I started editing your template, I fixed the Show Category code and it’s currently working with this code:
Please let me know if this works for you. I should update the default template since the show category code is old and buggy. Will be done for next version.
UPDATE: 0.15.1 includes a fix for the undeclared lcp_output variable. Also, regarding the thumbnail not displaying, please make sure you’ve modified the theme according to the get_the_post_thumbnail documentation.
SOLVED:
As we found out on the comments, the problem was with using STYLESHEETPATH instead of TEMPLATEPATH. This change will be included on the next release. Thanks Das for the feedback 😀
Shortcode: [catlist template=lcp_template_1 id=9 orderby=date numberposts=1 date=yes author=yes excerpt=yes catlink=yes thumbnail=yes ]
In the plugin folder > list_cat_posts.php, these are the instances for ‘thumbnail’:
And in my template, these are the instances for ‘thumbnail’:
So there is no misspelling, as far as I can see. I had already seen the forum thread you’re referring to, and made the correction to the default template.
The thumbnail is displaying as expected in the original post, so I don’t know why LCP is not pulling it along with the post. Unless it doesn’t do that with excerpts?