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
- Changing WooCommerce Display Price Based on User Role & Category [closed]
- Not able to change wp_title using add_filter
- Advanced Custom Fields and Yoast SEO keyword analysis [closed]
- Having different sidebar content for MANY pages?
- What do add_filters() and apply_filter() do?
- Can I display the widget admin in the page admin?
- SSL certificate for the host could not be verified
- Store source permalink on XMLRPC calls
- What to use instead of the content_save_pre filter?
- How can I customize the wp_list_categories
- Unfiltered html in widget title not working
- How can I reliably and globally disable wptexturize?
- Customise Jetpack Publicize text
- Can’t change a label in woocommerce with the normal filter
- WordPress RSS feed – filter RSS content by custom field value
- What is the filter hook for custom fields content?
- Add classname to the_category() function?
- Filter the URL of next_posts_link & previous_posts_link
- Explanation for remove_filter used in the below code [closed]
- How to change the blog title with add_filter? details below
- Gutenberg disable the “block” tab in right sidebar
- Editing
- the_content filter – checking the post
- add_filter to apply_filters that exists within class
- Disable widgets on specific posts
- Adding a title prefix with the the_title filter
- How to removes all instances of thumbnails displayed in my theme?
- How to modify an existing meta description?
- Adding TinyMCE buttons without removing plugin buttons?
- Can the wordpress color palettes by changed through Javascript?
- Filter on the_content doesn’t update the content being searched via register_rest_route
- Where to add_filter in theme functions.php?
- Any Ideas for Including “More Tag” with get_pages($args)?
- tag removed not using a filter
- How to customize the “Insert/edit link” popup box?
- Why does WordPress strip custom HTML that are form elements and theme SVG icons?
- Get current user data
- How can you wrap add_filter with a if is_home() statement?
- How to add attributes to WordPress Admin Sub Menu List Items
- How to combine multiple body classes
- How to replace username with email address in users table
- Hide Posts In Back-end/Admin Based On User’s (Pseudo) Privileges Controlled by ACF
- Filter Pages by Custom Field (ACF) in admin area
- Most performant/functional way to add actions/filters?
- Remove tags without a specific meta key from “choose from the most used tags”
- Making an add_filter() call from within an add_filter() call
- Finding actual functions added to hooks and filters
- Parent/Child pages
- Editing Help Section
- How to apply filter on get_the_post_thumbnail()
- How do I check if I can use the allowed_block_types filter?
- Setting the page title in a plugin, but not outside my plugin
- Add homepage to the list of pages in the Footer Widget
- loading a php file to a specific page id
- Action for opening attachment or manipulating all attachment links
- Remove the post_content search from WHERE clause (and CONCAT sql function)
- WP Job Manager – display search results from custom search form in taxonomy-job_listing_category page
- Conditionally (cpt) filter previous and next_post_link
- Post filter Month dropdown at front-end like wordpress backend
- Show different pages on site depending on user choice
- changing size image within the content
- WP Dashboard -> Posts-> Filter by Category -> Form Method Change : Which Hook
- Using wp_list_pages to create 2 lists of pages and include and exclude some of them depending on their category
- Is there a way to overwrite a filter used in canonical.php?
- How do I remove certain HTML elements with specific classes from the feed?
- confusion with add_filter
- post->post_content filter