I am Looking to append URL Parameter to all URLs

I don’t know if you still need the answer, but here’s working example for you. Header.php /*SAVE $_GET[‘aff’] TO COOKIE*/ if(!isset($_SESSION[‘aff’]) and $_GET[‘aff’]){ $cookie_expire = time()+60*60*24*30; $_SESSION[‘aff’] = $_GET[‘aff’]; setcookie(‘aff’, $_SESSION[‘aff’], $cookie_expire, “https://wordpress.stackexchange.com/”, ‘.’.$_SERVER[‘HTTP_HOST’]); } Functions.php – if you need to pass one parameter /*APPEND ‘aff’ PARAMETER IN URL THROUGH WHOLE SITE*/ function wprdcv_param_redirect(){ if(isset($_COOKIE[‘aff’]) … Read more

Weird: /?name in URL leads to blog

Those are reserved keywords When you visit a WordPress blog you have: blogindexpage/?queryvariables=queryvalues So for a search request: example.com/?s=searchterm For a post/page of ID 12: example.com/?p=12 etc etc Pretty permalinks hides all this by using regular expressions to map nice looking URLs on to their equivalents. This doesn’t prevent someone from still doing that though, … Read more

add_query_arg() One Key with multiple values

[*] You have to do a search and replace on $url like the following – $url = add_query_arg( array( ‘count’ => ‘100’, ‘property’ => array( ‘abc’, ‘xyz’ ) ), $base_url ); // following line will remove [*] and * can be nothing or 0-9 $api_url = preg_replace( ‘/\[\d*\]/’, ”, $url ); // Output will be … Read more

How to have numeric URLs in Posts and Pages

Hope the following code might help add_filter( ‘wp_unique_post_slug’, ‘mg_unique_post_slug’, 10, 6 ); /** * Allow numeric slug * * @param string $slug The slug returned by wp_unique_post_slug(). * @param int $post_ID The post ID that the slug belongs to. * @param string $post_status The status of post that the slug belongs to. * @param string … Read more

Adding a hook to ‘parse_request’ so that siteurl/pagename/xyz ignores “xyz”

I would just add a rewrite rule rather than try to modify query parsing. function wpd_series_query_var( $vars ){ $vars[] = ‘wpd_series’; return $vars; } add_filter( ‘query_vars’, ‘wpd_series_query_var’ ); function wpd_series_rewrite_rule() { add_rewrite_rule( ‘^series/([^/]+)/?$’, ‘index.php?pagename=series&wpd_series=$matches[1]’, ‘top’ ); } add_action( ‘init’, ‘wpd_series_rewrite_rule’ ); Don’t forget to flush_rewrite_rules() after adding new ones. You can then get wpd_series anywhere … Read more

List of default WordPress URLs

Currently I can’t offer a full answer to your question, but here as a starting point a (PHP 5.3+/closure) plugin that dumps the global WP_Rewrite object into the shutdown hook. <?php /* Plugin Name: Show WP_Rewrite Dump at the last hook (shutdown) */ add_action( ‘shutdown’, function() { var_dump( $GLOBALS[‘wp_rewrite’] ); } ); This doesn’t take … Read more

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