In that case you can get the list of categories and for each category create a text field something like this:
$categories = get_categories('hide_empty=0&orderby=name');
foreach ($categories as $cat){
$options[] = array(
"name" => $cat->name,
"desc" => "Select a color for ".$cat->name." category",
"id" => $shortname."_cat_".$cat->term_id,
"type" => "text",
"std" => "");
}
Related Posts:
- Best practices for a Style/CSS based theme options page?
- How to use media upload on theme option page?
- Add a page outside of the current theme?
- Switch Theme Through Options Panel
- How to make alert for new version on theme options?
- How to mark an option as selected
- How can I show more than 15 themes at a time in the admin menu?
- How to go about pre generating css file with variables from theme options
- How do I make the category template display full posts instead of partial posts?
- Does uninstalling a WordPress theme delete its database values?
- Cannot find the code for “Edit This” link in posts in a specific theme
- Defining different theme for Blog posts page
- How to set different settings for a mobile theme?
- Disable Theme API / Front end (for API only environment)
- What’s the proper way to include inlined javascript-source?
- How to understand a specific bit of WordPress syntax
- Should a child theme share the same theme options row as the parent, or should it have it’s own options row?
- Creating a theme options page
- Showing post thumbnail (attachment) on the archive.php category listing
- How Do I Use A Custom Mobile Theme?
- How can I make some themes usable only by admins?
- Custom options below pages/posts editor?
- Redux callback action
- Preserve theme settings when migrating from local to live
- Functions containing parameter ‘yourtheme’
- What is the “pub” theme? [closed]
- Passing dynamic options from backend to frontend
- Color Options from Theme Customizer API not returning via get_theme_mod()
- Issue with theme mod options during domain migration
- .PO file is found but I don’t see translations: how to debug the problem?
- How to add some php code in header.php using plugin
- WordPress activate theme error $pagenow
- Setting a new default template for the creation of a page
- Cannot update a file for my theme
- Switching among theme customizations
- how to create a section inside a section with theme options customizer
- Warning: call_user_func() expects parameter 1 to be a valid callback
- Create /archive page in WordPress Theme
- Church hope them issue
- How to change the language for the front-end only?
- Different template of products for specific category. WooCommerce
- Switching themes without losing widgets?
- Multiple image logo for theme
- How to export/import theme customizer settings?
- Loading template files from a subfolder in my theme?
- Hide Twenty Eleven Theme From Themes Page
- Is it mandatory to have a link to the theme designer?
- Multiple level category drop-down
- How do I change Twenty Nineteen’s primary color without using the color slider in the theme customizer?
- Exclude stylesheet from admin
- How to tell a theme to use different .mo and .po files?
- Can I apply a WP theme to a specific custom page template?
- Is it possible to use child theme of child them?
- Disable Sidebar in the Product Page in Storefront Theme [closed]
- Renaming the Twenty Fourteen WordPress theme
- Do we have rights to edit the source of the templates which are in wordpress.org?
- How do I tell how popular a theme is?
- Force theme or disallow theme change
- How to run WordPress from other location on the same domain
- Fatal error with a theme
- WordPress theme options and insert default value for serialize data
- How to change only one javascript function in wordpress child theme?
- Is there a way to get plugins and themes not built for multisite to work on a network subsite?
- The Cost of Installing Custom Themes
- Can I create a child theme from a premium theme without losing my posts and page etc that I already have?
- wordpress theme install failing
- WordPress suddenly creating theme errors
- Re-skinning Site
- How to reset a custom theme
- Warning : Invalid argument supplied for foreach() in theme php on line 56 [closed]
- Why submenu item’s background color is not changing by css?
- How to edit the font color of the H1 on a single page?
- Cannot see theme in my search
- What login/password do I need to install a wordpress theme?
- get_pages Not accepting my query
- Date based CSS/theme
- is theme network enabled?
- Setting Multiple Post Containers Across Homepage And Costumize Them
- wordpress-theme 2017: featured image behaviour: where to set the height of the featured image?
- Trying to create a child theme with plugin
- Own Theme custom CSS does not display in editor but works in page
- Remove Read More Buttons
- CSS/JS is not working in multi lang installation
- Error while downloading WordPress themes
- Theme stops media uploader from working
- Work on theme files on a server & browser preview before installing it
- Theme automatically inserting “more” tag on every post
- div having different appearances in different themes
- Category List in Theme Options Page
- Satoshi WordPress Theme – Portfolio SetUp Issues
- How to make a website like the ones in theme demos? [closed]
- Page structure using The Customizer Api
- theme 2016 – customize css – nothing happens
- Can’t upload the theme
- Divi theme including javascript
- Best Practice Jumbotron Image for WordPress ~ Responsive
- How to make a page extend full screen [closed]
- Should you directly edit Template Parts and Templates from themes?
- Remove ALL HTML from single page
- Remove Google Fonts from parent theme within a child theme [closed]