the corresponding hook would be https://developer.wordpress.org/reference/hooks/widget_pages_args/
example code:
add_filter( 'widget_pages_args','include_special_pages' );
function include_special_pages( $args ) {
$args['include'] = array( 147, 12, 32 );
return $args;
}
Related Posts:
- How can I modify the WordPress default widget output?
- How to hook into unregistering a widget instance?
- Filter Widget Title Wrap
- Is it possible to remove the filter from 4.8 text widget?
- How to hook wp_list_pages?
- Anyway to edit the titlebar of WordPress Widgets in the Admin area?
- Add filter to wp_dropdown_pages() or wp_dropdown_categories() – no select container?
- WordPress tag cloud add more links
- How to add a class to Tag cloud widget link?
- How to make a widget expand wider than the column width when editing its settings in the admin
- Warning: Missing argument 2 for widget_title filter
- How do I hide the current page’s title?
- wp_list_pages() but only show children on the branch you are on
- page_attributes_dropdown_pages_args filter does not work
- Add Bootstrap Classes to Recent Posts Widget
- Shortcodes within the sidebar text/html widget: How to preserve the raw HTML output of the shortcode?
- Alter existing page contents based on url
- I’ve set up an extra field for all the available widgets. How do I show it’s value in the front-end?
- Archive Widget – Count only parent posts
- how to output HTML tags in post_content and not as plain text
- Widget image reorganize layout
- How can I change the button text of a custom widget?
- How to filter page title for certain page?
- WordPress Tag Cloud Filter Prevents Widget HTML from loading
- Change URLs in default WordPress slider to relative from absolute
- How can I add a prefix to titles displayed in sidebar using function.php?
- Filter WordPress Archive Widget to exclude posts with specific custom taxonomy term id
- Output dynamic_sidebar_params in wp_head
- Filter on widget-title does not work with custom links
- Add HTML to Page Content
- Conditionally including JS based on whether ACF field is set [closed]
- How to use apply_filters(‘get_calendar’) to change get_calendar() output?
- Filter widget_pages_args not working in Pages Widget
- Woocommerce price filter widget always shows max price of most expensive product in the whole shop
- How do you add a filter to wp-block-page-list?
- what is __return_false in filters
- How To Determine If A Filter Is Called In A Sidebar/Widget Context?
- Passing Additional Parameters to add_filter Callable
- How can I add an Author filter to the Media Library?
- Modify WordPress Rest Api Request/Response
- How to add some custom HTML into wordpress admin bar?
- Change upload directory on custom plugin page
- apply_filters(‘the_content’, $content) alternative
- How to use the_excerpt in a filter hook?
- Add wrapper to only youtube videos via embed_oembed_html filter function
- Shortcodes not resolved in AJAX call response
- Possible to filter the posts or categories that XML-RPC users see in their mobile application?
- Ajax, filters and shortcodes
- wp_link_pages output appears twice
- Multiple Ajax Data Action
- How do I pass the value from a foreach loop to an add_filter function? [closed]
- Changing a WordPress core function without hacking core
- What is the optimal way to filter out subpages from admin?
- Change WordPress RSS link with filter?
- How to remove get_post_metadata using remove_filter inside a class?
- Include a specific page in your template
- Sorting and limitation with pre_get_posts
- Use add_filter on concatenated string variable
- Change term name only on front
- Change name of existing post status type
- How to filter meta_values using REST API
- Header image automatically changes depending on season
- Admin Backend – Search Pages only by title
- How to hide Ads in between posts on AMP? [closed]
- What is the downside of using a filter as a “poor man’s” dependency injection?
- Wrong post_status notice after wp_insert_post_data
- BBPress changing default group activity
- Comment search plugin
- add_filter with retrieve_password_message() not working in plugin, but works in functions.php
- Add a div of content within the_content after a certain block
- Gutenberg Block – Post Featured Image Filter Hook
- separate categories with comma and srounded by single quote
- Prevent add_filter being applied to wp-admin pages
- Translate custom order status through a filter?
- Using preg_replace() with the_content filter
- apply_filters(‘get_the_content’, $content) + Except
- Filter everything from content except output of a shortcode
- Different widgets in sidebar on sub-children pages?
- Is there a way to globallly apply esc_html( … ) to all inputs and anchors to filter out XSS markup?
- Shorten the title length
- Problem with Class, Filters and Callbacks
- Renaming wordpress login and get new password button
- Using filter in the widget causes fatal error
- Parse a shortcode differently based on on what it’s nested in
- How to redirect template_directory to subdomain relativ url?
- How do I add tags to entire comments, not just their text
- Modify WordPress Page Title ()
- How to add lazy field in content endpoint using Gutenberg blocks
- how to use apply filter for Class?
- Re-order search results with posts_orderby filter and post meta value
- Set Microsoft Word links to open in new window/tab
- WordPress get_avatar filter to match logins
- ‘the_content’ Filter delivers empty string with lengh (608)
- How to sort posts according to meta value?
- include exception inside theme for empty widget area
- Change shortcode output (filter?)
- remove_filter excerpt_more from a plugin class
- How to elect position of new item output in a dropdown when using add_filter
- Query Multiple Filters, one with Meta
- How to remove a filter that is an object method?