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
- Link to specific Customizer section
- When cropping a header image, retain meta data (i.e. name, description, etc.) from original image?
- How to create a new theme from scratch?
- Adding a Template to the Page Attributes Panel for both Posts and Pages?
- How do you change the theme location?
- How do I put my comment form above the comments?
- How can I check for malware in a Theme? [closed]
- Theme Advanced Styles in Visual Editor and Paragraphs
- Want to have the Post editor remembering the last editing position
- Theme of codinghorror.com
- How to add template to theme in WP
- Download WordPress.com theme: how?
- WordPress security issue to output data from user input from theme option form
- Custom theme folder
- Create a dashboard-style site (not WordPress dashboard) – is there a theme? [closed]
- Help with WordPress Query
- Are theme .php files stored in the database?
- Inject widgets from one sidebar into another with PHP
- Execute filter in theme as last
- Why style.css with ?ver=3.9.2 not updating as the one without ?ver=3.9.2?
- An unexpected error occurred. Something may be wrong with WordPress.org
- Updating my free theme delete all my changes [closed]
- Do not show one specific widget on one specific page
- Website redesign – New theme – Help needed
- ‘Add New’ button not present [closed]
- correct tags for validating input types
- Buddypress User Settings template location? [closed]
- How to code static pages in WordPress
- How do I manually revert back to my old theme?
- Modifying the markup in the Tag Cloud widget?
- wp_enqueue_style $dep argument does nothing?
- Is it a good practice to disable wpautop for premium themes?
- How to use custom page templates in a theme that hides page template option?
- How to include stylesheet in custom admin using parent_slug
- After installing a free theme, my wordpress turns into text mode when accessing remotely
- I made new theme directory, why won’t it show up in admin GUI?
- Migrating a website using custom image tags to use featured images instead
- Editing Theme and Moving Servers
- Whitespace between logo and site title in Twenty Twenty-Two
- CSS appears to not work on any WordPress theme
- Is it a good idea to make WordPress theme repository public?
- How to validate new added field (Phone number) which is added to registration form?
- How do you remove the “The Link You Followed Has Expired” error for a subfolder website?
- Theme does not allow shortcodes
- What is an alternative to not using child theme to customize a WordPress theme?
- My theme is adding an unmatched end tag and outputting it to my screen
- Is a dynamic website with lots of urls possible with wordpress [closed]
- Sticky header for wordpress changes size and logo size as I scroll down
- WordPress theme directory naming
- How to assign a Category to a Page, when both are created on theme initiation?
- adding a unique page to an existing site
- How to fetch the no. of Users dynamically?
- spacing disappears on posts when importing
- Create a child Theme or custom Theme
- how to get rid of header banner buttons on child themes [closed]
- Mystique theme: widgets on sidebar falling under the page content
- HTML content filtered on blog page
- Homepage not loading correctly, only after refreshing
- Does WordPress maintain revisions for index.html template?
- Tried to install new theme
- Trouble with formatting buttons in WordPress:Twenty Twenty-Four [closed]