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"]
[ul]
[li]Unordered[/li]
[/ul]
[ol]
[li]Ordered[/li]
[/ol]
[/nr]
This is my shortcode // Add Shortcode function custom_shortcode_nr( $atts , $content = null ) {
// Attributes
$atts = shortcode_atts(
array(
'time' => '15m',
'timec' => 'h0m15',
'title' => 'the title',
),
$atts,
'nr'
);
// 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>
<ul>
<li class="unli">Unordered</li>
</ul>
<h3>title or</h3>
<ol>
<li class="orli">Ordered</li>
</ol>
Is this possible?
thanks