display onswipe cover page when using static page as frontpage
-
If you install the Onswipe plugin (1.0) on a WordPress site using a static frontpage browsing to the main site URL using an iPad will not display the cover page. Not pretty, as this will just display the static page and not the magazine swipe page. Next, there is no standard dashboard option to change this.
Luckily, two simple additions to the /onswipe/themes/warp/views/index.php file can fix the problem.
By default, index.php in the mentioned directory has the following code:
<?php global $t,$Options; $singleOrPage = (is_single() || is_page()); ?> <?php if (!$singleOrPage) { if ($Options->get('padpress_warp','show_cover') && is_home()){ $this->partial('cover'); } ?> <section id="entry"></section> <?php }else{ $this->partial('single'); } ?>
To make the cover page load add is_front_page() to the first and second if statements like this:
<?php global $t,$Options; $singleOrPage = (is_single() || is_page()); ?> <?php if (!$singleOrPage || is_front_page() ) { // added is_front_page() to if statement. makes sure single post/page layout doesn't load when using custom frontpage if ($Options->get('padpress_warp','show_cover') && is_home() || is_front_page()){ // added is_front_page() to if statement. makes sure cover page loads on custom frontpage $this->partial('cover'); } ?> <section id="entry"></section> <?php }else{ $this->partial('single'); } ?>
Hope this helps until the Onswipe developers create an option to select a static frontpage different from the regular.
- The topic ‘display onswipe cover page when using static page as frontpage’ is closed to new replies.