Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi
    Thanks for using our theme. If you want your desired page on front page.
    For this you need to set front page as static page.
    Kindly go to Setting >> Reading > > A static page (select below) >> Select page in Homepage Option
    More help see the snapshot .
    http://prntscr.com/penwhv
    Let me know for further assistance .

    Thanks

    Thread Starter mkdeniz

    (@mkdeniz)

    Hi Akhlesh,
    thanks for your support.
    I already have my desired page on front page as static.
    what i want is, if a user arrives to my site on desktop i want to show front page 1.
    if the user arrives to my site by a mobile, i want to show front page 2, which is developed for mobile users.
    so the url for my site estecenter-japan.com is same but the response is different depending on the browser of the user.
    can you please help?

    best regards,

    Murat

    Hi
    Thanks for clear your need.
    For this follow the given below instruction.

    Find the function.php file located in your appointment blue child theme folder.
    Open it and add the below code inside this file.

    <?php
    //* Do NOT include the opening php tag shown above. Copy the code shown below.
    //* Redirect homepage on mobile
    add_action( ‘wp_head’, ‘wps_params’, 10 );
    function wps_params() {
    ?>

    <script>
    if (window.location.pathname == ‘/’ && jQuery(window).width() <= 480) {
    window.location = “/m/”;
    }
    </script>

    <?php } ?>

    Let me know for any confusion.

    Thanks
    Akhilesh

    Thread Starter mkdeniz

    (@mkdeniz)

    Dear Aklesh ,
    Thanks a lot for your support.

    I could not get the point

    <?php
    //* Do NOT include the opening php tag shown above. Copy the code shown below.

    Can you please explain?
    Does this mean I need to remove all the rest of php in the function.php file?

    Thanks a lot

    Murat

    Hi
    Ignore this line (//* Do NOT include the opening php tag shown above. Copy the code shown below.) and just add the below code in functions.php file.

    <?php
    add_action( ‘wp_head’, ‘wps_params’, 10 );
    function wps_params() {
    ?>
    <script>
    if (window.location.pathname == ‘/’ && jQuery(window).width() <= 480) {
    window.location = “/m/”;
    }
    </script>
    <?php } ?>

    More help see the snapshot below link.
    http://prntscr.com/phr7ct

    Thanks
    AKhilesh

    Thread Starter mkdeniz

    (@mkdeniz)

    Hi Akhilesh

    I got this message on the top of my page:
    Warning: Use of undefined constant ��wp_head�� – assumed ‘��wp_head��’ (this will throw an Error in a future version of PHP) in /home/beigemink7/www/wp/wp-content/themes/appointment-blue/functions.php on line 45

    Warning: Use of undefined constant ��wps_params�� – assumed ‘��wps_params��’ (this will throw an Error in a future version of PHP) in /home/beigemink7/www/wp/wp-content/themes/appointment-blue/functions.php on line 45

    Can you please let me know what the problem is?
    Thanks in advance
    Murat

    Hi
    It’s working fine at our end.
    Send me your admin detail at my email address.

    [email protected]

    So that we can check what’s going wrong with your end.

    Thanks
    Akhilesh

    Thread Starter mkdeniz

    (@mkdeniz)

    Hi Akhilesh,

    I replied to your gmail.

    Please let me know which admin detail you need.

    Best

    Murat

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘redirect mobile device’ is closed to new replies.