Return to Support

Static Home Page

Home Forums Graphene Mobile Neo Support Static Home Page

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #8945
    Sharon
    Member

    Hi all,

    I’m genuinely hoping this might be my last question; fingers crossed! I’m still having issues with the homepage on mobile.

    In Graphene, I have Reading Settings: Static – Front Page (Home) – Posts Page (Blog). Ten blog posts to show.

    I’ve created a Blog Page – http://juiceandsmoothierecipes.com/blog/

    I’ve created a Child Theme for Neo and set Any Mobile Theme Switcher to show that on all mobile devices.

    I’ve popped Prasanna’s php into the php file of the child theme, exactly as it appears below:

    <?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');

    ?>

    Home page on mobile is still showing as “Home”. Wondering where have I gone wrong?

    Regards,

    Sharon

    #42444
    Sharon
    Member

    Hi again all,

    Since posting this question, I’ve been playing around with setting and plugins. Deactivating, reactivating, unticking boxes, refreshing, reticking boxes, refreshing and nothing sees to me working.

    I’m at a loss. I’m sure it’s propbably just a little thing that I have, or have not, done, but I just can’t seem to figure it out. Any suggestions would be most welcome.

    Also, I was wondering if it’s possible to create a totally new home page for mobile. In the php above, the function redirects to blog_mobile. Would it be possible, I wonder, to have it redirect to a certain page, say “Home-2, or something in that order? Perhaps I page that I design and create just specifically for mobile? And, would this be possible given that I have chosen “Static” for the home page of my blog?

    Cheers,

    Sharon 🙂

    #42445

    Have you tried changing

    'page_for_posts'

    to the actual page slug:

    'home'

    #42446
    Sharon
    Member

    Hi Kenneth,

    No, I hadn’t tried that. Just popped it in then, but no joy. I tried swapping in 'blog' as well. Also no good….

    #42447
    Syahir Hakim
    Keymaster

    Hi Sharon,

    I would suggest getting the Pro version of Any Mobile Theme Switcher (costs from free to $100). The pro version has the option to set different home page for mobile themes, in addition to other features like compatibility with W3 Total Cache.

    #42448
    Sharon
    Member

    Hi Syahir,

    Thanks so much for that. I got the pro version of Any Mobile Theme Switcher today, so I’ll create a new home page for mobile. That’ll make things a lot easier. I really appreciate you giving me the heads up on that, I wouldn’t have found it otherwise.

    Cheers,

    Sharon

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

You must be logged in to reply to this topic.