Title: Cannot change permalink
Last modified: December 6, 2017

---

# Cannot change permalink

 *  Resolved [01labs](https://wordpress.org/support/users/01labs/)
 * (@01labs)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/cannot-change-permalink-3/)
 * Hi!
 * I am using the Juniper theme and I can’t get it to include the “?redirect_to=
   random” as the end of the page url. I saw another support ticket where this could
   be added to eliminate the “?”, where do I insert this code?
 * $permalink = get_permalink( $default_redirect_to ).’?utm_source=xy’;
 * Sorry, WordPress newbie here! I appreciate all the help!
 * Mark

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Christoph](https://wordpress.org/support/users/camthor/)
 * (@camthor)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/cannot-change-permalink-3/#post-9758122)
 * You mean, if your blog address is [http://www.example.com](http://www.example.com)
   and you use for example [http://www.example.com?redirect_to=last](http://www.example.com?redirect_to=last),
   it does not go to the last post? What exactly is the expected result? Where do
   you want to use the link and which post do you want to show?
 * `$permalink = get_permalink( $default_redirect_to ).’?utm_source=xy’;`
    only 
   helps to add a new parameter to the final URL, if no post could be found with
   the search parameters and therefore the redirect goes to a default post instead.
   I think that’s not what you need.
 *  Plugin Author [Christoph](https://wordpress.org/support/users/camthor/)
 * (@camthor)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/cannot-change-permalink-3/#post-9758136)
 * If the question is about where to insert the link: You could go to Admin->Appearance-
   >Menus, there you create a new menu entry of type “Custom Link” and use as URL“?
   redirect_to=random”.
 *  Thread Starter [01labs](https://wordpress.org/support/users/01labs/)
 * (@01labs)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/cannot-change-permalink-3/#post-9758228)
 * Thank you for your prompt response. Sorry for the vague description. I tried 
   to change the format of the permalinks in the Juniper theme to accommodate the“?
   redirect_to=random” but it changed it to “redirecttorandom”. I tried to use the
   default permalink but it only inserted a page number.
 * So then I saw this post that said that you can insert the code so you won’t need
   to insert the “?” in the permalink.
 * From your last reply it looks like I can create a new custom permalink to include
   the “?redirect_to=random”. Is that right?
 * Thank you again for all your help!! I’m sure this is WP 101 stuff.
 *  Plugin Author [Christoph](https://wordpress.org/support/users/camthor/)
 * (@camthor)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/cannot-change-permalink-3/#post-9759250)
 * Is your website already accessible so that you could post the address here?
 * Changing the format of the permalink – you mean in Settings -> Permalink? I think
   that is the wrong place. The permalink is the format of links of individual posts(
   and archives). You decide there if you want to have there parts of the publishing
   date etc. It is not the place for a redirection – therefore the name **perma**
   link.
 * This plugin works differently:
    1. A visitor goes to a URL that is the URL of your blog (or a page on it), plus
       appended “?redirect_to=random” (or something else at the end)
    2. The plugin turns that URL into another one, depending on that “redirect_to” 
       parameter. In your case, the URL of a random post. (Actually, **that** now is
       a permalink.).
    3. The visitor will be redirected to that post (through its permalink), and only
       now the theme becomes active.
 * So the first step you need to check, if you type the address of your blog (e.
   g. the home page) into a browser, append “?redirect_to=random”, press return,
   if it now goes to a random post. _Please check and confirm_, or post the blog
   address here.
 * Then, if that works, you want to supply that modified link to your visitors. 
   You could
    - Send it to them by email
    - Add a menu item, as described above
    - Simply enter it as a link behind a text or a button
    - Do some complicated PHP stuff that results in that link
 * I tried now the Juniper theme, and it does _not_ remove ? from links. Here all
   works as expected. So, _where exactly_ did you use the link with the “?redirect_to
   =…”? In a post? In a page? In a menu?
 * PS: You cannot create a new custom permalink to include the “?redirect_to=random”.
   If the permalink would contain a redirection, then the resulting permalink would
   again redirect, never ending.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Cannot change permalink’ is closed to new replies.

 * ![](https://ps.w.org/redirect-url-to-post/assets/icon-256x256.png?rev=1742449)
 * [Random Post Plugin - Redirect URL to Post](https://wordpress.org/plugins/redirect-url-to-post/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/redirect-url-to-post/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/redirect-url-to-post/)
 * [Active Topics](https://wordpress.org/support/plugin/redirect-url-to-post/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redirect-url-to-post/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redirect-url-to-post/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Christoph](https://wordpress.org/support/users/camthor/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/cannot-change-permalink-3/#post-9759250)
 * Status: resolved