• Thanks for a great plugin! I am using it with WP 3.0’s new default theme, “Twenty Ten”…

    I have created a new template for the plugin to use in displaying the category posts on Twenty Ten’s pages. I’m trying to tweak the template to make it compatible with the “Twenty Ten” theme. If I can succeed I would love for the new template to be a blessing to others for their use.

    So far, I have only two main issues I need help with:

    1. AESTHETICS – Shortcode for Caption not handled:
    In the “List Category Posts” plugin’s output, the “Caption” Shortcode (a core part of WP) is not being parsed or handled. To see an example of this in action, visit this page. That page shows static page content at the top, and the posts under it (starting with the HR tag) are related category posts. How can I get the “List Category Posts” plugin to parse or handle the the “Caption” Shortcode?

    2. SECURITY: Admin’s real username shown
    We are using a technique (for added security) of having an admin username other than “admin.” The idea is to keep that name hidden. It provides one more layer of obfuscation (requires one more step for hackers). However, the plugin currently shows it. The “show author” portion of the code provides the author’s “nicename” instead of the “display name” or the “nickname.” How can I edit the template code (shown below) to show the “display name”? (The “nickname” would be acceptable too, either/or.) Also is there a way to preserve the case of the name (e.g. “DJones” instead of “djones”)?

    //Show author?
    	if($atts['author']=='yes'){
    		$lcp_userdata = get_userdata($single->post_author);
    		$output.= ' - ' . $lcp_userdata->user_nicename;
    	}

    Thanks again for such a great plugin! I am in high hopes that I can create a TwentyTen (WP 3.0) compatible template for the plugin (one that does not require messing with core files and is totally upgradable), and make it available to all.

    http://wordpress.org/extend/plugins/list-category-posts/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter dougjoseph

    (@dougjoseph)

    Ok, we have found the answer for #1 above. Found an answer on this page: http://wordpress.org/support/topic/320014?replies=6
    …That led to this page: http://wordpress.org/support/topic/320635?replies=2
    …Which led to this page in the Codex: http://codex.wordpress.org/Template_Tags/the_content#Alternative_Usage

    …Which shows the following code for applying filters to get the shortcodes parsed:

    <?php
    $content = apply_filters('the_content', $content);
    $content = str_replace(']]>', ']]>', $content);
    ?>

    Below is how we used that info to solve the problem of how to get the shortcodes parsed. By simply experimenting, I got this to work by changing this:

    //Show content?
    	if($atts['content']=='yes' && $single->post_content){
    		$output.= '<p>' . $single->post_content . '</p>';
    	}

    …to this:

    //Show content?
    	$output.='<div class="entry-content">';
    	if($atts['content']=='yes' && $single->post_content){
    		$content = apply_filters('the_content', $single->post_content); // added to parse shortcodes
    		$content = str_replace(']]>', ']]&gt', $content); // added to parse shortcodes
    		$output.= '<p>' . $content . '</p>'; // line tweaked to output filtered content
    	}

    Thread Starter dougjoseph

    (@dougjoseph)

    Now, if someone can help me get the author’s display name (or nickname) to show instead of “nicename” currently shown in the plugin’s template….

    We’ll have a fairly solid WP 3.0 ‘Twenty Ten’ compatible version of the plugin. Anyone have any tips?

    Hey DougJoseph, thanks for such a great job. #2 was fixed on version 0.9 which I just uploaded.

    Version 0.10 will include the fix you found for the_content. Thanks!!

    Thread Starter dougjoseph

    (@dougjoseph)

    Excellent! Thanks!

    Perhaps you can say the plugin is now compatible with WordPress 3 / Twenty Ten…

    Have you tested it with WordPress 3 / Twenty Ten? If so, please let me know if it works, so that I can say it’s compatible 🙂

    Thanks! Regards

    Thread Starter dougjoseph

    (@dougjoseph)

    Yes, I have tested at this page:

    http://baseline.wvupci.org/?page_id=16

    It displays the full content ‘filtered’ and it displays the author’s ‘display name’ instead of actual username. Great! Thanks!

    Please take a look at the page to see if the formatting is as you would like it to be. When you are satisfied with the test, I may later remove the page.

    Thread Starter dougjoseph

    (@dougjoseph)

    PS: That test was done on a “baseline” WP 3.0 (latest build as of this time) with the default Twenty Ten theme running.

    Thread Starter dougjoseph

    (@dougjoseph)

    Fernandot:

    Hello friend. 🙂

    I have found another issue with regard to the “List Category Posts” plugin’s compatibility with WP 3.0 / Twenty Ten.

    If the page (which is displaying category posts) has any photos attached to it, and any one of the displayed category posts has a gallery of photos set to display, then the page’s photos get displayed instead of the category post’s photos.

    While I understand the problem, I confess I don’t know how to fix it.

    The widget doesn’t hold the chosen category. After selecting a category the dropdown snaps back to the first item in the list.

    Thread Starter dougjoseph

    (@dougjoseph)

    You might try to post your widget issue on the plugin page, or try contacting the author of the plugin.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: List category posts] List Category Posts > TwentyTen (WP 3.0) compatible template’ is closed to new replies.