List category posts
[resolved] Templates not working? (2 posts)

  1. Jay Collier
    Posted 5 years ago #

    I made a change to templates/default.php (adding another class to UL) and called that templage from the shortcode. The change did not appear in the delivered page.

    I created another template and made changes to that one, calling it from the shortcode. No changes. Then, I made the change to list_cat_posts.php and it appeared.

    So, it appears that templates not being called from the shortcode; i.e. not being found by the plugin.

    Is anyone else seeing this? Perhaps related to 3.01 multisite?

    This is the relevant code in the plugin.

    //Template code:
    	$tplFileName = null;
    	$possibleTemplates = array(
    		// File locations lower in list override others
    	foreach($possibleTemplates as $key => $file) {
    		if (is_readable($file)) {
    			$tplFileName = $file;
    	if ((!empty($tplFileName)) && (is_readable($tplFileName))) {
  2. Jay Collier
    Posted 5 years ago #

    Resolved. I had the custom template in the wrong location.

    I created a folder called /list-category-posts/ in my theme directory and placed a copy of the default template there. Then I called it from the plugin: template=text01.

    Working fine. The FAQ page should be rewritten:

    template - File name of template in /list-category-posts/ directory in your theme, without extension. Example: For 'template.php' value is only 'template'. Default is 'default' that means template in code of plugin not in template file, that's an unordered list (ul html tag) with a CSS class: 'lcp_catlist'

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • List category posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic