Your plugin is just what I’m needed.
However, how do you add more URLs? Surely 10 is not the max…
10 URLs is what’s currently coded but it is possible to add more… about how many are you looking to have?
Well, an unlimited amount, honestly. We will be having a blog on our main site as well as our mobile subdomain, so yeah…
As it stands, though, 20-40 would be ideal for now.
But I just ran into another problem! The theme I use for our site uses a widgetized homepage, so I can’t find the title to input into the plugin to redirect mobile visitors from the home page.
Other regular pages are working just fine.
Any ideas on how to solve this?
I can email you a copy with more available redirects or tell you where to add them in the code?
And yeah the pages currently do need a title in order to redirect them, in the next few days I’ll add a option in the settings page for the homepage in case it doesn’t have a title.
If you are going to have a full blog on your main site and mobile site I would consider just making the main site responsive, this plugin was more made to redirect pages although it will redirect single posts too.
I cannot start using the plugin until I get my home page to redirect, so if you want to finish working on that then you can email me a copy with more redirects.
Thank you so much for help in advance! Great support!
@kerp77 here is an alternative version of the plugin for a homepage without a name and with 30 possible redirects… Make sure you fill in the Homepage URL box because it is required…
cleaned up a bit and added a checkbox to enable/disable the Homepage redirect
Thanks a lot, uniquelylost!
One last question —
What do I need to edit to add more fields if I need them?
Inside the plugin folder you will see equivalent-mobile-redirect.php go on line 63 you will begin to see-
$page_array = trim(wpw_get_option('wpw_emr_t1')); $page_array = trim(wpw_get_option('wpw_emr_t2')); $page_array = trim(wpw_get_option('wpw_emr_t3')); $page_array = trim(wpw_get_option('wpw_emr_t4')); $page_array = trim(wpw_get_option('wpw_emr_t5')); $page_array = trim(wpw_get_option('wpw_emr_t6'));
Just add more and change ‘wpw_emr_t6’ to the right number till you get to the amount you want…
Then in admin/theme-options.php starting on line 69 you will begin to see pairs of title and url-
$options = array("name" => __("Page Title #1 - e.g. About ",'wpw'), "desc" => __("",'wpw'), "id" => "wpw_emr_t1", "desc" => "", "type" => "text"); $options = array("name" => __("Mobile Site URL #1 - http://m.sample.com/about ",'wpw'), "desc" => __("",'wpw'), "id" => "wpw_emr_murl1", "desc" => "", "type" => "text");
Just add extra pairs after the last pair and change the “id”‘s to the right number. They will be numbered like “wpw_emr_t1” & “wpw_emr_murl1” so you will be able to tell when the last pair is. If you need help once you need more though just let me know and I can help.
Hi uniquelylost and thanks so much for this plugin!
It does exactly what Google actually wants, which is to redirect to the equivalent page, not just the Homepage of the mobile site.
I have downloaded the version you put up with the ability to enter 30 URLs and followed your instructions to add more.
I need to go up over the 100 mark and I am having a problem.
Foe some reason when I add more than the 30 URLs the data is accepted but when I refresh everything above 30 simply disappears.
Any idea why this keeps happening.
OK, I just found what I did wrong… move along folks nothin’ to see here.
Glad you got it to work :). And the idea of this plugin came from Google’s new redirection guidelines. Google also recommends to add the following code to your mobile and desktop sites to identify them. This code to your desktop website header.php
<link rel="alternate" media="only screen and (max-width: 640px)" href="http://m.example.com/" />
And than this to your mobile header.php
`<link rel=”canonical” href=”http://www.example.com/” />’
- The topic ‘No. of URLs’ is closed to new replies.