Title: Plugin doesn&#8217;t create valid urls when using cat=
Last modified: January 14, 2022

---

# Plugin doesn’t create valid urls when using cat=

 *  Resolved [A.T.](https://wordpress.org/support/users/annaryker/)
 * (@annaryker)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/plugin-doesnt-create-valid-urls-when-using-cat/)
 * I’m trying the plugin but it doesn’t create valid urls. I’ve deactivated all 
   the other plugins to check for compatibility issues, but this does not solve 
   the problem.
 * According to the documentation, when I put [random-url cat=”cat1″] it should 
   output `https://mydomain.com/random/?cat=cat1`
    But it doesn’t, it outputs /random/?
   cat=cat1. It doesn’t put my domain in front.
 * I can only get the full url by putting my domain in front manually like this:`
   https://mydomain.com[random-url cat="cat1"]`
 * But this doesn’t work in the wysiwyg editor when I want to create a clickable
   link:
    When I enter `https://mydomain.com[random-url cat="cat1"]` as the link
   target, this is transformed to `https://mydomain.com/random/?cat=%26quot%3Bcat1%
   26quot%3B&posttype=post&r=0` This leads to a 404 page.
 * When I use the html editor and type `<a href="https://mydomain.com[random-url
   cat="cat1"]">link</a></p>`, the link becomes this: `https://mydomain.com[random-
   url cat="`
    It’s cut off because the first quotation mark is seen as the end 
   of the href.
 * How can I fix this? I’ve disabled all other plugins, tried on a fresh install,
   but the problem persists.
    When I use [random-url] there are no problems, because
   there are no quotation marks I think. But I really need to be able to filter 
   per category.
    -  This topic was modified 4 years, 4 months ago by [A.T.](https://wordpress.org/support/users/annaryker/).
    -  This topic was modified 4 years, 4 months ago by [A.T.](https://wordpress.org/support/users/annaryker/).

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

 *  Plugin Author [Robert Peake](https://wordpress.org/support/users/robertpeake/)
 * (@robertpeake)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/plugin-doesnt-create-valid-urls-when-using-cat/#post-15253415)
 * Why do you need your domain in front? /random/?cat=cat1 should go to the exact
   same place when clicked…
 *  Thread Starter [A.T.](https://wordpress.org/support/users/annaryker/)
 * (@annaryker)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/plugin-doesnt-create-valid-urls-when-using-cat/#post-15253616)
 * Hey Thank you for your response. You are correct, but not putting the domain 
   in front doesn’t change the issue with the quotation mark breaking the url (when
   using cat=)
 * When I put the shortcode in the visual editor, the shortcode is transformed into
   a link, but the quotation marks are changed to `=&quot;` The link does not function
   because of this and goes to a ‘server not found page’.
 * If I put the shortcode in via the html editor it is not transformed into an url
   and just becomes `<a href="https=//[random-url cat="cat1"]"="">link</a>`
 * You can see my issue here:
    [https://neyens.me/test-3/](https://neyens.me/test-3/)
 * Any suggestions on this?
 * Thank you!
    -  This reply was modified 4 years, 4 months ago by [A.T.](https://wordpress.org/support/users/annaryker/).
    -  This reply was modified 4 years, 4 months ago by [A.T.](https://wordpress.org/support/users/annaryker/).
    -  This reply was modified 4 years, 4 months ago by [A.T.](https://wordpress.org/support/users/annaryker/).
 *  Plugin Author [Robert Peake](https://wordpress.org/support/users/robertpeake/)
 * (@robertpeake)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/plugin-doesnt-create-valid-urls-when-using-cat/#post-15269707)
 * The easiest workaround would be to not use the shortcode, just the link URL. 
   It will still pick a random page from that category. HTH!

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

The topic ‘Plugin doesn’t create valid urls when using cat=’ is closed to new replies.

 * ![](https://ps.w.org/better-random-redirect/assets/icon-256x256.png?rev=1039316)
 * [Better Random Redirect](https://wordpress.org/plugins/better-random-redirect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/better-random-redirect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/better-random-redirect/)
 * [Active Topics](https://wordpress.org/support/plugin/better-random-redirect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/better-random-redirect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/better-random-redirect/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Robert Peake](https://wordpress.org/support/users/robertpeake/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/plugin-doesnt-create-valid-urls-when-using-cat/#post-15269707)
 * Status: resolved