Non-static homepage for mobile version

  • Mandado

    #7693

    Hello,

    In my website thecrazytravel.com I have a static homepage using graphene theme, but for my mobile version I would like to be able to use the blog page. Is it possible?

    Thanks!

    Prasanna SP

    #39048

    This has been answered in Graphene Mobile forum. Are you able to access Graphene Mobile forum? If so, here is the thread – https://forum.graphene-theme.com/graphene-mobile-support-requests/front-page-on-mobile-theme-different-than-static-frontpage-for-desktop

    See my reply here.

    Mandado

    #39049

    I can see Adam asking a similar question, but I cannot read your answer. Just “Please purchase Graphene Mobile to add new topics as well as view and add replies in this forum.”

    Prasanna SP

    #39050

    First you have to create a child theme for Graphene Mobile Neo. Then add the below code to child theme’s functions.php

    <?php
    function redirect_home_to_blog_mobile() {
    if ( is_front_page() ) {
    wp_redirect ( get_permalink( get_option( 'page_for_posts' ) ) );
    exit;
    }
    }
    add_action('template_redirect', 'redirect_home_to_blog_mobile');

    Mandado

    #39051
    Quote:
    First you have to create a child theme for Graphene Mobile Neo. Then add the below code to child theme’s functions.php

    <?php

    function redirect_home_to_blog_mobile() {

    if ( is_front_page() ) {

    wp_redirect ( get_permalink( get_option( ‘page_for_posts’ ) ) );

    exit;

    }

    }

    add_action(‘template_redirect’, ‘redirect_home_to_blog_mobile’);

    Thanks, I set up the child theme functionality and add the code, it works.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.