Jump to content


Photo
- - - - -
Resolved

My Function Is Not Working .



This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1 gayatriom

gayatriom

    Advocate

  • Members

  • 559 posts

Posted 17 November 2012 - 03:05 PM

Hi I've added this to pagelines customize and it doesn't seem to work:

add_action('wp_enqueue_scripts', 'filg_get_js');
function filg_get_js() {
wp_enqueue_script("jquery");
}

add_action('wp_head', 'ie_redirect');

ie_redirect() {
<?
if ( preg_match("/MSIE/",$_SERVER['HTTP_USER_AGENT']) )
header("Location: '

Please Login or Register to see this Hidden Content

);
exit;
<?php
}

#2 gayatriom

gayatriom

    Advocate

  • Members

  • 559 posts

Posted 17 November 2012 - 03:05 PM

Please Login or Register to see this Hidden Content



#3 gayatriom

gayatriom

    Advocate

  • Members

  • 559 posts

Posted 17 November 2012 - 09:19 PM

For an internet explorer redirect script this is what I ended up using.
I placed this in the head section under Custom Code.
The key was creating an html page OUTSIDE of wordpress for the page that it redirects too.
Hope this helps someone!


<!--[if IE]>
<script type="text/javascript">
<!--
window.location = "

Please Login or Register to see this Hidden Content


//-->
</script>
<![endif]-->

#4 gayatriom

gayatriom

    Advocate

  • Members

  • 559 posts

Posted 17 November 2012 - 09:20 PM

Please Login or Register to see this Hidden Content



#5 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts

Posted 18 November 2012 - 09:58 PM

Hi,

Unfortunately, we don't have a means of validating your code. You'd need a developer/programmer to do that. We do offer Pros to help via

Please Login or Register to see this Hidden Content



Hopefully one of them can help you identify any problems.

#6 gayatriom

gayatriom

    Advocate

  • Members

  • 559 posts

Posted 18 November 2012 - 10:50 PM

Hey the above worked. You can close this.
If anyone needs to use it, they can.

#7 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts

Posted 18 November 2012 - 10:55 PM

No problem. Glad it worked!

#8 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts

Posted 18 November 2012 - 10:55 PM

The topic was marked as resolved.