Viewing 6 replies - 1 through 6 (of 6 total)
  • Anonymous User 9782929

    (@anonymized-9782929)

    What is your domain? Is the mobile site WordPress-driven? How is the mobile site generated?

    Thread Starter Gunjesh Gaurav

    (@gunjesh123)

    yes my mobile site is runing under wordpress,i had generated this as subdomain, and its rooted to mysite main directory in my hosting panel please check this https://www.endorsment.com or m.endorsment.com

    Anonymous User 9782929

    (@anonymized-9782929)

    You’re getting this error:

    XMLHttpRequest cannot load https://www.endorsment.com/wp-admin/admin-ajax.php. Origin https://m.endorsment.com is not allowed by Access-Control-Allow-Origin.

    You’ll need to update your CORS headers. Maybe this will help: https://bowdenweb.com/wp/2011/05/how-to-enable-cors-in-wordpress.html

    Thread Starter Gunjesh Gaurav

    (@gunjesh123)

    i have tried to update cors but problem did not solve, this site provided diffrent code as following;

    <?php /** @package WordPress @subpackage Default_Theme **/
    header(“Access-Control-Allow-Origin: *”);
    ?>
    <!DOCTYPE html>

    but my theme header look like diffrent like this:

    <?php

    // Exit if accessed directly
    if ( !defined(‘ABSPATH’)) exit;

    /**
    * The Header for our theme.
    *
    * Displays all of the <head> section and everything up till <main id=”main”>
    *
    * @package The Skeleton
    */
    ?><!DOCTYPE html>

    Thread Starter Gunjesh Gaurav

    (@gunjesh123)

    i have updated core file, added this line in header:
    “header(“Access-Control-Allow-Origin: *”);”
    but problem did not solve, can you tell me any other way to solve this issue?

    Anonymous User 9782929

    (@anonymized-9782929)

    Sorry, I’m not too sure how to add that other than the resource I mentioned. I’ll be releasing version 2.0 soon and it will resolve this issue anyhow. Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘plugin does not work on mobile version of site’ is closed to new replies.