Problem adding more than 1 element to the shortcode class="" option.


In the Shortcode docs under the optional attributes, there is a line that reads,

class – Additional CSS classes to use for further styling.

Adding more than one results in them all being combined (spaces are removed). For example:

[course_action_links label="" class="btn btn-lg btn-success"]

The above results in the following:

class="apply-links course-action-links course-action-links-1533 btnbtn-lgbtn-success"

What is the correct way to add more than 1 class to the line.


  • Predrag Dubajic
    • Support

    Hey @Anthony,

    Hope you're doing well today :slight_smile:

    Can you try downloading attached file, unzip it and place it in your wp-content/plugins/coursepress/includes/classes/ folder overwriting the existing one and see if it works after that?

    I will see with the developers if this can be changed in next release but I suggest bookmarking this thread so you can apply the change again if it's not included in next update.

    What I did is removed below code from line 1883:
    $class = sanitize_html_class( $class );

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.