Home › Forums › Graphene Mobile Neo › Support
Non-static homepage for mobile version
-
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.
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');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.
