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
Share This Thread :

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


Related Threads
Thread Author Replies Views Last Post
  [GET] Purchased Codecanyon Wordpress Plugins [Updated Daily] Spiderman 25 4,730 2018-10-10, 11:18 AM
Last Post: dresseswhite
  [TUT] How to find Fresh & Trending Mobile game niches suthars4n 92 20,494 2018-10-09, 11:23 PM
Last Post: fredy0
  Mobile Offer landing page tchiko 0 215 2018-10-09, 02:33 PM
Last Post: tchiko
  [SHARE] Best Site for Finding Mobile Niches DrKent 33 4,318 2018-09-15, 01:50 PM
Last Post: carryminati
  [HQ][GET]FaceBook Like Jacker Wordpress Plugin Leunamriu 42 19,714 2018-09-10, 01:53 PM
Last Post: Samarbete





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

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