Home Forums Front-end Issues Returning theme color slug


Returning theme color slug

  • Hi, I want to return the slug of a theme color, but this option doesn’t seem to exist, how to do it please?

    I’m using theme colors from functions like this:

    	'name'  => esc_attr__('Primary', 'theme'),
    	'slug'  => 'primary',
    	'color' => $colors['primary'],
  • If you convert the value to lowercase and convert any spaces to hyphens, this would be the same as returning the slug.

    Would that work?

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

You must be logged in to reply to this topic.