Last active
December 17, 2015 17:09
-
-
Save LinzardMac/5644471 to your computer and use it in GitHub Desktop.
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
// Include WP | |
define('WP_USE_THEMES', false); | |
in | |
// actually contains what you would expect | |
var_dump($wp_query); | |
//set it as a global (get same error with or without this set) | |
global $wp_query; | |
class WordpressHeader extends Module | |
{ | |
public function hookDisplayHeader(){ | |
return '<link rel="stylesheet" type="text/css" media="all" href="'. get_stylesheet_uri() . '">'; | |
do_action( 'init' ); | |
} | |
public function hookDisplayFooter(){ | |
$wp_query = new WP_Query( 'post_type=any', 'nopaging=true' ); | |
// same error with or without this global set | |
global $wp_query | |
//here it returns NULL | |
return dynamic_sidebar( 'footer' ); | |
} | |
# return dynamic_sidebar( 'footer' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment