Search
 
SCRIPT & CODE EXAMPLE
 

PHP

check url parameter if not redirect wordpress plugin

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' );
Comment

PREVIOUS NEXT
Code Example
Php :: no sass folder in laravel 
Php :: blade check user role laravel 
Php :: how to re assign value of associative array after assign in php 
Php :: upgrade php 7.3 to 7.4 
Php :: numberformater php format to k and m 
Php :: isset in php 
Php :: How to make a simple mail system in Laravel without view or notification 
Php :: Unable to do sum and getting same value by using while loop php 
Php :: Best documentation tools for php 
Php :: php get the two number of time second 
Php :: php multi string to single string 
Php :: array_push php 
Php :: php strftime year 2 digits 
Php :: laravel search and return record with pagination 
Php :: wordpress theme basics including CSS and js 
Php :: causes of class not found in laravel 
Php :: remove field from object php 
Php :: laravel faker value or null 
Php :: netchain media 
Php :: laravel validation messages 
Php :: PHP XML Expat Parser 
Php :: echo require php 
Php :: yajra datatables html column bulder example 
Php :: base64_img 
Php :: what is php 
Php :: laravel use cache 
Php :: middleware in laravel 
Php :: create services in laravel with command line 
Php :: @can in laravel 
Php :: download html table to excel 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =