old_slug_redirect_post_id WordPress Filter Hook

The old_slug_redirect_post_id hook is used to redirect users to the new post URL if they try to access the old post URL. This can be useful if you change the permalink structure of your site and want to make sure that users are redirected to the new URL.

apply_filters( 'old_slug_redirect_post_id', int $id ) #

Filters the old slug redirect post ID.


Parameters

$id

(int)The redirect post ID.


Top ↑

Source

File: wp-includes/query.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.9.3Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.