Mobile page vs. post recognition
-
I’m using wordpress mobile pack, and it seems like everything is derived from the index.php template. The way my site is organized I need to set up a different template for pages so that the material shows up correctly. It seems like there’s something in this index.php that looks to see if it’s a single post or a page, but how do I separate it so that if it’s a page it’ll display different content? I think the code I need to edit is here:
global $more;
$more=(is_single() || is_page())?1:0;if (file_exists($wpmp_include = wpmp_theme_group_file(‘index.php’))) {
include_once($wpmp_include);
} else {while (have_posts()) {
the_post();
print ‘<div class=”post” id=”post-‘ . get_the_ID() . ‘”>’;
if(is_single() || is_page()) {
print ‘<h1>’ . get_the_title() . ‘</h1>’;
wpmp_theme_post_single();
} else {
print ‘<h2>‘ . get_the_title() . ‘</h2>’;
wpmp_theme_post_summary();
}
}
if(!is_single() && !is_page()) {
print ‘<p class=”navigation”>’;
next_posts_link(__(‘Older’, ‘wpmp’));
print ‘ ‘;
previous_posts_link(__(‘Newer’, ‘wpmp’));
print ‘</p>’;
}}
}
The topic ‘Mobile page vs. post recognition’ is closed to new replies.