WordPress Non-Plug-in Implementation of Adding Link Jump Function


Link form http://localhost/?Go=http://www.baidu.com.

Copy code

The code is as follows:

add_action(‘wp_head’, ‘gourl’);
function gourl() {
global $pagenow;
if (is_home && $pagenow == ‘index.php’) {
$location = $_GET[‘go’];
if ($location != “”) {
wp_redirect(esc_url_raw($location), 302);

Copy the above code to the functions. PHP file of the theme to achieve WordPress link jump function

Recommended Today

Hadoop MapReduce Spark Configuration Item

Scope of application The configuration items covered in this article are mainly for Hadoop 2.x and Spark 2.x. MapReduce Official documents https://hadoop.apache.org/doc…Lower left corner: mapred-default.xml Examples of configuration items name value description mapreduce.job.reduce.slowstart.completedmaps 0.05 Resource requests for Reduce Task will not be made until the percentage of Map Task completed reaches that value. mapreduce.output.fileoutputformat.compress false […]