check url parameter if not redirect wordpress
function redirect_direct_access( ) {
$post_id = get_the_ID();
if ( $post_id == POST_ID && !isset( $_GET[ 'voluumdata' ] ) ) {
wp_redirect( 'REDIRECT_URL' );
exit();
}
}
add_action( 'template_redirect', 'redirect_direct_access' );
Also in PHP:
- current date php function
- clear file cache laravel
- create seed laravel
- console rint in php method
- PHP Warning
- composer detect php version
- create seed class in laravel
- Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes
- date format Y-m-d H:i:s and time zone in php
- datetime to date in php
- easy admin bunfle symfony modify login page
- clear laravel cache
- array unique in php using a column
- How to check duplicate data in PHP
- $_SERVER php where link came from
- $this->throwError php
- dsiplay array on php
- Array of array unique php
- check if string contains substring pho
- access violation: 1071 Specified key was too long;
- find string in the string php
- contains in string php
- exist in string php
- catch error in php