Creating a custom rewrite for a single page

Thanks to the help of the link provided by @q-studio I was able to determine the correct course of action. Firstly I setup an action to load the code in the init using the ‘init’ tags in an add_action(); within my functions.php file. add_action( ‘init’, ‘wpteaminfo_init’ ); Then i created the function to setup my … Read more

Append a parametter at first or last to a certain URL

I got my code working now. Here is the below code that append that extra parameter to the end of the URL specified above. add_action(‘init’, ‘add_custom_query_for_search’); function add_custom_query_for_search(){ global $wp; $tempUrl = home_url() . add_query_arg( $wp->query_vars ) . ‘&propertyType=RNT’; if( ! isset($_GET[‘propertyType’]) && (strpos($tempUrl, ‘homes-for-sale-search’) !== false) ){ wp_redirect($tempUrl); die; } }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)