Title: link not opening
Last modified: September 1, 2016

---

# link not opening

 *  [Kai Niermann](https://wordpress.org/support/users/joloshop/)
 * (@joloshop)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/link-not-opening-1/)
 * Hi there I am going mad I am using window.location.href = however the link show
   but it does not open. see for yourself [http://gutscheincloud.info/gutscheine/otto-10prozent-rabatt-4](http://gutscheincloud.info/gutscheine/otto-10prozent-rabatt-4)

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

 *  [cedcommerce](https://wordpress.org/support/users/cedcommerce/)
 * (@cedcommerce)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/link-not-opening-1/#post-7605952)
 * Hie joloshop,
    window.location.href is used to fetch current URL. You have to
   assign URL to it, if want to redirect to some other page. To redirect to some
   other page please try script like this :
 *     ```
       <script>
       window.location = "https://www.google.co.in”;
       </script>
       ```
   
 * -OR-
 *     ```
       <script>
       window.location.href = "https://www.google.co.in”;
       </script>
       ```
   
 * Hope this will solve your purpose.
    Thanks
 *  Thread Starter [Kai Niermann](https://wordpress.org/support/users/joloshop/)
 * (@joloshop)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/link-not-opening-1/#post-7605979)
 * Hi thank for your help, i did that. still the link shows but did not open.
 * This is my code
 *     ```
       <script type="text/javascript">
       window.setTimeout(function() {
           window.location.href = "<?php echo get_clpr_coupon_url( $post ); ?>";
       }, 2000);
       </script>
       ```
   
 *  [Jacob Peattie](https://wordpress.org/support/users/jakept/)
 * (@jakept)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/link-not-opening-1/#post-7605980)
 * What are you expecting `<?php echo get_clpr_coupon_url( $post ); ?>` to be?
 * At the moment it’s `http://gutscheincloud.info/gutscheine/otto-10prozent-rabatt-
   4`, which is the page you linked to. So it gets stuck in a loop.
 *  Thread Starter [Kai Niermann](https://wordpress.org/support/users/joloshop/)
 * (@joloshop)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/link-not-opening-1/#post-7605984)
 * sorry i was testing no its supposed to open [http://gutscheincloud.info/go/otto-10prozent-rabatt-4/126891](http://gutscheincloud.info/go/otto-10prozent-rabatt-4/126891)
   which now shows but is not opening if you reload it opens
 *  [cedcommerce](https://wordpress.org/support/users/cedcommerce/)
 * (@cedcommerce)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/link-not-opening-1/#post-7606075)
 * Please use below code.
    It is running absolutely fine.
 *     ```
       <script>
       window.setTimeout(function() {
       window.location.href = "https://www.google.co.in";
       }, 2000);
       </script>
       ```
   
 * If this doesn’t work for you, means <?php echo get_clpr_coupon_url( $post ); ?
   > is creating some problem. Kindly echo that and see is you are getting the value
   you are expecting or not.
 * Thanks
 *  Thread Starter [Kai Niermann](https://wordpress.org/support/users/joloshop/)
 * (@joloshop)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/link-not-opening-1/#post-7606077)
 * unfortunately still not working, the link opens but it is not executing…. if 
   i reload the the side it opens…

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

The topic ‘link not opening’ is closed to new replies.

## Tags

 * [forward](https://wordpress.org/support/topic-tag/forward/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 3 participants
 * Last reply from: [Kai Niermann](https://wordpress.org/support/users/joloshop/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/link-not-opening-1/#post-7606077)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
