New answers tagged

0

Pretty much wp-load.php is the only way to go. I don't think there is really another way to load the WordPress functions safely... You can account for path variations by recursively including it from any file where you need it though... eg. function file_find_require($file,$folder=null) { if ($folder === null) {$folder = dirname(__FILE__);} $path ...


1

function custom_function_redirect() { if ( isset( $_GET[ 'link' ] ) && $_GET[ 'link' ] != '' ) { wp_redirect( $_GET[ 'link' ], 301 ); }else{ die('test'); } } add_action('template_redirect','custom_function_redirect'); Try this it worked for me. For redirection you should hook the function in template_redirect



Top 50 recent answers are included