• Resolved FirstRulez

    (@firstrulez)


    I am new to using this plugin, but am sure that it will be able to provide me with what I need. I have two issues:

    1. adding Class to posts list
    I am adding a list of posts to a page tempalte using the code "<?php echo do_shortcode("[catlist name=news numberposts=8 tag=h4]"); ?>" which works well. I would like to add title_class="lcp_title" however when I add this due to the double quotes it breaks the PHP processing of the command. inserting title_class=lcp_title does not work due to the missing quotes and the browser does not process the class name.

    I would be grateful if you could advise how to make this work when inserting into a page template.

    2. changing order of display (date then title)
    When I enable date=yes the date displays more or less how I want it to (I have the same problem as above for using dateformat="l F dS, Y") but I would like to have the date shown above the title of the post. I could not see any option for configuring this on the help pages?

    Thank you in advance for your help 🙂

    Dave

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter FirstRulez

    (@firstrulez)

    With regards to problem 1 I have mostly resolved the issue by escaping using \ so my entry in the template file is <?php echo do_shortcode("[catlist name=news numberposts=8 tag=h4 date=yes date_class=\"lcp_date\" title_class=\"lcp_title\"]"); ?> however this is resulting in the following output:

    <ul class="lcp_catlist" id="lcp_instance_0"><li class = current ><a href="http://my-URL/post-name/" title="Post Title">Post Title</a><span class="lcp_date"> January 2, 2014</span></li></ul>

    As you can see the class for the date is being output correctly but the class for the title is incorrect (missing quotes) and the H4 tag is missing.

    I will keep trying to see if I can resolve but your assistance would be appreciated.

    Thread Starter FirstRulez

    (@firstrulez)

    I’ve still not been able to resolve the issue with the output options when using this plugin from the template.

    Any chance of a pointer to what may be wrong?

    Thanks

    Plugin Author Fernando Briano

    (@fernandobt)

    Try switching to single:
    <?php echo do_shortcode("[catlist name=news numberposts=8 title_tag=h4 date=yes date_class='lcp_date' title_class='lcp_title' ]"); ?>
    Same for dateformat: dateformat='l F dS, Y'

    That should work. Regarding the h4 tag, you need to use title_tag not tag for this to work.

    Thread Starter FirstRulez

    (@firstrulez)

    Many thanks. That seems to have sorted it 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Help with layout and output options’ is closed to new replies.