Try this,
$categories_array = array();
$categories = get_categories();
foreach( $categories as $category ){
$categories_array[] = $category->term_id;
}
array(
'param_name' => 'category_id',
'type' => 'dropdown',
'value' => $categories_array, // here I'm stuck
'heading' => __('Category filter:', 'overmax'),
'description' => '',
'holder' => 'div',
'class' => ''
),
Related Posts:
- Dropdown with category selection
- Saving two categories from two dropdowns in front end posting form
- Get id of category from drop down menu
- Return array of categories to php function
- How to add HTML5 ‘required’ attribute to wp_dropdown_categories() without JavaScripts?
- Listing all posts from current category on page
- Display WooCommerce product categories in a 4 columns custom menu [closed]
- Show post only if match all categories
- How to retain the values from dropdown category lists after wrong form submission?
- Dropdown category filter
- Help with multiple dropdown tags search
- How to use wp_category_checklist()?
- wp_dropdown_categories and custom taxonomy + custom post type
- How to provide value for ‘selected’ on wp_dropdown_categories() for ‘multiple’ options
- Resort get_categories
- Additional form options based on category selected not working
- wp_dropdown_categories() scripts working erratically on sidebar
- Create menu locations for each category in wordpress
- How do I display only two categories Instead of displaying all categories
- Dropdown Categories used in form shows no results when all is selected
- Trying to get variables in hacked category dropdown
- Use premade array as categories in wp_query?
- Array: What is this value based on?
- wp_list_categories walker without links on categories that have subcategories (to make a nested dropdown menu)
- How to get an array with all categories and corresponding names?
- Link To Child Category For A Post
- List a maximum of ‘x’ product categories with qty of ‘y’ in each column
- Filter posts by categories ajax is showing nothing
- WordPress Customizer: Dropdown with Category output
- Filter By Category Dropdown List With Custom Taxonomies
- Need to echo category id in multi-dimensional array
- Getting Category Children
- A dropdown with checklist
- I need to exclude from a query a category and a few custom taxonomies
- Wp Dropdown Category Not Show Current As Title
- wp_dropdown_categories initial value
- Exclude category from drop down list form
- Trying to get categories and sub-category listing
- Get_term_meta() always returns false
- Woocommerce Category Sort Dropdown
- How to add custom option to wp_dropdown_categories?
- custom browse by
- Cant get unique_array() work on get_the_category() foreach loop
- Get category fixed in dropdown browse categories
- Categories dropdown with all values selected using wp_dropdown_categories
- add custom option to get_categories dropdown
- Taxonomy for custom post type not found
- Matching usermeta at registration to categories of content
- Form Value of drop down category + Translation of ‘show option none’
- How to change category id on get_posts array
- How to define category ID in an array?
- Order Categories by Character Count
- how do I exclude a category foreach
- Fetch Post Category
- How to create an automatic MultiColoumn MegaMenu with Categories WordPress
- Is There a Difference Between Taxonomies and Categories?
- List all subcategories from category
- How To Find Out WordPress Category Table in MYSQL?
- Add custom field to Category
- Get Category ID inside Category template
- Only one category per post
- WordPress Multisite – global categories
- Get the children of the parent category
- Get posts from sites in Multisite?
- WP REST API: filter by category 1 AND category 2
- How To Get Parent Category Slug of Current Post
- Display All Products by Category with WooCommerce
- What is the difference between a “tag” and a “category”?
- Is there an easy way to make a meta box have the tabs like the Categories meta box has?
- How to check if I’m on the last page of posts?
- Display posts from the same category using next/previous post link
- How would I get a taxonomy/category list inside a Gutenberg block?
- Can I set a default featured image for a category?
- Check if a post is in any child category of a parent category
- How to export and import taxonomies (category, tag and/or custom taxonomy) and their terms
- Force category choice before creating new post?
- Gutenberg editor add a custom category as wrapper for custom blocks
- WooCommerce: List All Categories
- How to get category and archive title?
- Get category ID from category slug (not working)
- How do I remove “Uncategorized” from posts with more than 1 category?
- Get rid of WordPress category, tag and author archives?
- Individual rss feed entry length for categories?
- How can I create a category landing page followed by pages of posts?
- Remove parent category from permalink? Basically only have the child category?
- Custom permalink structure leads to be 404 on pagination
- Retrieve Product category ‘NAME’ by product category ID – WooCommerce?
- Posts URL structure like site.com/category/the-post-title
- Can’t custom taxonomies have same terms (slugs) as categories?
- How to get permalinks with category base working with sub-categories
- How to remove the term “category” from category pagination?
- Using wp_category_checklist in a widget
- WP 3.9 TinyMCE no longer loads on category description editor
- On the category page, get the category object
- Get only the top level categories using get_categories() without foreach loop
- Get all categories and posts in those categories
- How to add featured image for category (without a plugin)?
- How to create a custom sort for WordPress categories
- How to display non-hierarchical taxonomy as terms with checkboxes?
- Category archive by year with permalink support /category/YYYY