Function: _reset_front_page_settings_for_post

_reset_front_page_settings_for_post( integer $post_id )

Reset the page_on_front, show_on_front, and page_for_post settings when a linked page is deleted or trashed.

Shortcut: rfpsfp

You can use above key combination to trigger the associated snippet for this function in the WordPress Snippets for Visual Studio Code extension. You can also use this shortcut to search for this function on this website.

Also ensures the post is no longer sticky.


Name Type(s) Default Value Description
$post_id integer

Post ID.

WordPress Developer Newsletter

Stay informed of new chapter releases, important WordPress API updates and more.