Last active
May 17, 2016 22:59
-
-
Save dotspencer/67609ee2ae65847c594b1f873699716f to your computer and use it in GitHub Desktop.
Custom wordpress php header for loading quickly the page for parsing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html <?php language_attributes(); ?>> | |
<head> | |
<meta charset="utf-8"> | |
<?php | |
//if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); | |
//wp_head(); | |
?> | |
<body <?php body_class(); ?>> | |
<div class="page-container <?php if (get_field('layout_mode', 'option') == "boxed") { echo "page-boxed"; } ?>"> | |
<div class="preloader"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add this at beginning of page.php | |
<?php | |
if (isset($_GET['mode']) && $_GET['mode'] == 'quick'){ | |
get_header('empty'); | |
} else { | |
get_header(); | |
} | |
?> | |
// This at end | |
<?php | |
if (isset($_GET['mode']) && $_GET['mode'] == 'quick'){ | |
exit(); | |
} | |
?> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment