Rename page URL

I have tried some add_rewrite_rule magic and query variables and it worked. Thanks for the help everyone. If in case anyone want to refer the answer: add_filter( ‘query_vars’, ‘wpse26388_query_vars’ ); function wpse26388_query_vars( $query_vars ){ $query_vars[] = ‘custom_gallery_id’; return $query_vars; } add_rewrite_rule( ‘topic/([^/]+)/([^/]+)/gallery/([0-9]+)/?$’, ‘index.php?pagename=gallery&custom_gallery_id=$matches[3]’, ‘top’ ); I was able to solve my problem with this.

Two Rewrite Rules

Catch those requests before WordPress can see them: RewriteEngine On RewriteBase / RewriteRule ^link/(\d+)$ /links/index.php?link=$1 [L,QSA] Place the WordPress rules below the link rules.

Generating custom URL before post is published

I think the post needs to be inserted first. This is a sample function that updates the post slug after it’s been inserted. // Update post slug $my_post[‘ID’] = $pid; $my_post_name=”post_name” . “-” . $pid; $my_post[‘post_name’] .= $my_post_name; // Update the post into the database wp_update_post( $my_post ) It’s combining the post_name with post ID … Read more

My wordpress site must be being affected by outside sources [duplicate]

Sounds like you got a recycled domain and/or your hosting configuration is not configured right. Also by running a traceroute you have multiple domains set for both http://www.kgstiles.com & http://www.kgstiles.com/pureplantessentials This is a pretty common scenario but can sometimes cause some domain issues. I wouldn’t rule you the possibility of some external source affecting your … Read more