you can easily do this the same way as wp_list_pages()
, using wp_dropdown_pages()
.
the args needed to retrieve the pages are the same.
for the categories, use wp_dropdown_categories()
Related Posts:
- Add body class of category parent
- Setting a default text for excerpts of a particular category
- Graphic before title – Specific Category
- How to Insert A List of Posts in A Category Written by the Author into the Author Archive
- Remove Actions/Filters added via Anonymous Functions
- Display random categories on the front page (Finding and Editing Theme Functions)
- Add class to menu items of one specific menu (nav_menu_css_class)
- How to influence the information displayed on widget inside wp-admin
- How to restrict actions and filters “properly” by conditions
- Filter the query ONLY for the search results page
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- ajax category filter
- How to add classes to images based on their categories?
- Using add_filter() in Widgets
- Customize WordPress Media Manager – Media Window
- Is it possible to use a forgot password url filter?
- Wrap gutenberg block ‘div’ in other elements/extra HTML
- Generating Responsive Background Image Sizes in PHP
- Remove Page Title from Static Frontpage
- Change ul class=”children” for wp_list_pages?
- Default or Preset Content for Custom Post Types
- Override a class function to include a custom template
- How to add a rel attribute to images that contains their categories?
- How to set child post categories to parent post categories when updating parent post?
- Add filter to wp_dropdown_pages() or wp_dropdown_categories() – no select container?
- Exclude Empty Child Categories in Menu
- add_filter priority problem
- Clean-up script tags
- How to use IF Statement in WordPress?
- modify a function filter
- Super simple shortcode not working
- How would go about if I just want a temporary function?
- Generating rel=prev and rel=next only on wordpress categories
- How to make applyFilters function return false via functions.php
- Attach parent category template to all subcategories
- How to filter out shortcode when displaying the_excerpt() in the loop?
- Accepted arguments value in hook functions
- exclude a category from a search on a specific page
- Filter categories of posts with checkboxes
- Which action hook to use for function?
- Adding multiple taxonomy filters to functions.php
- Custom HTML in specific category single page and its descendant categories
- How to get specified parent page title in my function
- Last updated date function
- Possible to display shortcode based on the category?
- Modify a function without editing template
- Select pages by category
- How to set default archive image without overriding first attached image? [closed]
- Only let plugin add actions to wp_head & wp_footer on single posts
- Disable auto-resizing of uploaded images, but only for certain filename
- How to make custom column Admin>Users sortable?
- Filter out other users comments. Visualize only own comments and editor role users’ comments
- Get Current Post ID in functions php, meta query filter
- Output and filter data from a XML url
- Add to cart php not working [closed]
- What did I do wrong in my functions code, that will not change the “Get New Password” text to “Send It”?
- create filter in functions.php
- How to filter $content in shortcode function
- Insert image in WordPress with HTML5 tag and caption function
- How to construct function for applying filter?
- Redirect to another page using contact form 7? [closed]
- allow only one post in specific category
- Add Element as a Filter to the_content
- How to obtain the recent posts without their content in an efficient way?
- Running script based on Category
- Can’t properly set the_title add_filter to show short_URL
- (Woocommerce) Order by price when entering specific category
- Filter an WordPress Function in (general-template.php)
- Filter nav menu items HTML tags and wrap inner text with span
- issue with if/elseif in_array inside foreach loop display only one post
- Set “woocommerce_is_purchasable” to false for specific “$product->is_stock_status”
- add_filter to specific WooCommerce Category
- How to rewrite wordpress search to work on specific category
- How to add custom li item to wordpress menu
- Specify multiple categories for custom post template – FATAL ERROR
- Is it possible to use add_filter in an included file in the child theme’s functions.php?
- Insert Content Before div#main from the functions.php File
- Changing the text of Upload/Insert on Posts and Pages Screen
- Conditional custom menu?
- Get URLs for AJAX Filter Checkboxes WordPress
- How to display an image before title text in menu items
- Filter works on last selection but no others
- Save_post – Warning: Cannot modify header information
- custom error message for empty username and password using authenticate filter not working
- Remove the ‘category’ url for one category type
- How do i tweak my wp Post title base on category of the post
- Prevent function from triggering on current page
- Assign IDs to headings in ACF using functions.php
- how to remove a tag in the_category function
- Menu and category highlighting for a single post
- Redirect specific author posts to another url
- $content is empty while using DOMDocument
- Best way to add image to recent posts widget?
- How To Get WordPress Categories Last Update Date?
- Print all inline styles to head
- Function Reference for custom link in Admin Menu Management Page
- Force resize for all video content
- Way of getting queried loop before the query with a filter hook?
- Trying to get this function to show below the content
- function to show youtube videos within excerpt – if condition and apply_filters