WordPress Help Needed - Separate Link redirection for mobile and desktop devices
2015-08-09, 09:39 PM,
#1
Hey guys,

I have a PPD/CPA Wordpress website and have both good traffic for mobile and desktop devices.

I have only one product on the site which is kinda a generator and i think i will be using PPI method and also CPAgrip.

So, I want the download button to redirect all the mobile devices to my CPA link from CPAgrip which will help convert mobile traffic. And, I want the desktop devices to go to PPI link for the same download button. I am not a pro at coding so can anybody please give me detail instruction. Thanks a lot!

Have a Great Day!
Reply
2015-08-10, 03:59 PM,
(This post was last modified: 2015-08-10, 03:59 PM by Pratik_.)
#2
You can do this using this PHP for WordPress post plugin - https://wordpress.org/plugins/php-code-for-posts/

Basically, you can create unlimited php MyCodes using that plugin and add that shortcode in the post. An example would be to first create a shortcode having contents like:

PHP Code:
<?php
//if the traffic is coming from mobile devices (includes iPads and tablets too)

if ( wp_is_mobile () )
{
?>
// put your mobile download button HTML code here
<?}
else { 
// for any other traffic other than mobile devices, for example desktops
?>
// put your desktop download button HTML code here
<?}?>

On saving this shortcode, you will get get a shortcode looking like [php snippet-1]. Paste that in your post where you want your button to output.

That's it. Hope this helps.

Edit;

You can also create multiple shortcodes like these for each post you want, so there are no limitations here. :-)
Latest Thanks - View all

screenfreezer(2015-08-10 06:16 PM) 
Reply
2015-08-10, 06:15 PM,
#3
Thanks a lot brother... :) I really needed it!
Reply
2015-08-10, 07:53 PM,
#4
(2015-08-10, 03:59 PM)Pratik_ Wrote: You can do this using this PHP for WordPress post plugin - https://wordpress.org/plugins/php-code-for-posts/

Basically, you can create unlimited php MyCodes using that plugin and add that shortcode in the post. An example would be to first create a shortcode having contents like:

PHP Code:
<?php
//if the traffic is coming from mobile devices (includes iPads and tablets too)

if ( wp_is_mobile () )
{
?>
// put your mobile download button HTML code here
<?}
else { 
// for any other traffic other than mobile devices, for example desktops
?>
// put your desktop download button HTML code here
<?}?>

On saving this shortcode, you will get get a shortcode looking like [php snippet-1]. Paste that in your post where you want your button to output.

That's it. Hope this helps.

Edit;

You can also create multiple shortcodes like these for each post you want, so there are no limitations here. :-)

is there any way for split the mobile traffic in two categories by the OS: android and iOS ?

Pay the cost to be the boss

Reply
2015-08-10, 08:06 PM,
#5
(2015-08-10, 07:53 PM)BaStan Wrote: is there any way for split the mobile traffic in two categories by the OS: android and iOS ?
I don't know if there's an inbuilt WordPress function for it like it has to detect mobile devices, but using PHP to detect user-agent (you can Google that) should work well I believe. Since you can use any type of PHP and advance code, everything can be done. :)
Reply
2015-08-10, 08:07 PM,
#6
(2015-08-10, 08:06 PM)Pratik_ Wrote:
(2015-08-10, 07:53 PM)BaStan Wrote: is there any way for split the mobile traffic in two categories by the OS: android and iOS ?
I don't know if there's an inbuilt WordPress function for it like it has to detect mobile devices, but using PHP to detect user-agent (you can Google that) should work well I believe. Since you can use any type of PHP and advance code, everything can be done. :)

I would search for it ,thanks for the idea with user-agent function, I forget about that Grin

Pay the cost to be the boss

Reply
2015-08-10, 08:08 PM,
(This post was last modified: 2015-08-10, 08:08 PM by Pratik_.)
#7
(2015-08-10, 06:15 PM)screenfreezer Wrote: Thanks a lot brother... :) I really needed it!
Not an issue. Happy to help!

(2015-08-10, 08:07 PM)BaStan Wrote:
(2015-08-10, 08:06 PM)Pratik_ Wrote:
(2015-08-10, 07:53 PM)BaStan Wrote: is there any way for split the mobile traffic in two categories by the OS: android and iOS ?
I don't know if there's an inbuilt WordPress function for it like it has to detect mobile devices, but using PHP to detect user-agent (you can Google that) should work well I believe. Since you can use any type of PHP and advance code, everything can be done. :)

I would search for it ,thanks for the idea with user-agent function, I forget about that Grin
Great. The pleasure's all mine. :-)
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [SHARE] Best Site for Finding Mobile Niches DrKent 30 2,689 2017-10-13, 05:35 AM
Last Post: alaahit
  Free Lords Mobile Hack Generator Landing Page MrShareCare 1 151 2017-10-10, 10:34 AM
Last Post: zenious
  [TUT] Facebook Mobile Verification Trick/Bypass [VIDEO ADDED] ιηvιηcιвℓε 82 11,639 2017-10-02, 09:51 PM
Last Post: reshamanair
  Madden NFL Mobile Hack Generator Landing Page MrLions 4 324 2017-09-26, 11:11 AM
Last Post: MrLions
  [Tested Method] How You Can Earn 100$ in next 5 Days - NO website needed hmmm Exo 94 35,773 2017-09-24, 01:24 AM
Last Post: weps83




About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2017 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top