• Resolved zofijeczka

    (@zofijeczka)


    Hi,
    I would like if it is possible tu use <span> in title of the accordion lines?
    for now when I use span in title there is a massage:
    “Please enter a title attribute”
    (without <span> </span> it is working good. but then I can not change the color of numbers.
    Thank You!

    What I do is:

    /*$content = '[accordion]';
    foreach ($child_posts as $child_post) {
    	$title = '<span class="nr">'.$child_post->fields['nr'].'.</span> '.$child_post->post_title;
    
    $content .= '[accordion-item title="'.$title.'"]'.$child_post->fields['text'].'[/accordion-item]';
    }
    $content .= '[/accordion]';
    echo do_shortcode($content);*/

    So the result should be like
    01 Title
    02 Title2

    https://wordpress.org/plugins/accordion-shortcodes/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author philbuchanan

    (@philbuchanan)

    There is currently no way to use span tags in the title of the accordion shortcodes directly from the plugin. You would have to use JavaScript to insert the span after the accordions have loaded on the page.

    Thread Starter zofijeczka

    (@zofijeczka)

    Thank You for Your response.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘span in shortcut title in .php’ is closed to new replies.