Customise standard lists within my shortcode

I have a simple custom shortcode that works fine inserting the attributes. However is it possible to put the standard lists within my shortcode and customise them for the output?

This is my input for the shortcode

[nr title=”title” time=”time” timec=”c”]



This is my shortcode
// Add Shortcode
function custom_shortcode_nr( $atts , $content = null ) {

// Attributes
$atts = shortcode_atts(
‘time’ => ’15m’,
‘timec’ => ‘h0m15’,
‘title’ => ‘the title’,

// Return image HTML code
return ‘<div id=”nr”><h2>’ . $atts[‘title’] . ‘</h2><ul class=”details”><li><strong>Time ‘ . $atts[‘time’] . ‘</strong> (‘ . $atts[‘timec’] . ‘)</li></ul>’ . $content . ‘</div>’;
add_shortcode( ‘nr’, ‘custom_shortcode_nr’ );

This is the output functionality I would like to happen to unordered and ordered lists within my shortcode

<h3>title un</h3>
<li class=”unli”>Unordered</li>

<h3>title or</h3>
<li class=”orli”>Ordered</li>

Is this possible?


Read more here:: Customise standard lists within my shortcode

Leave a Reply

Your email address will not be published. Required fields are marked *