This file contains 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
// create fake page called "chat-room" | |
// modify function and variable names with "ABCD" to whatever you like | |
// modify variable $fakepage_ABCD_url to the fake URL you require | |
add_filter('the_posts','fakepage_ABCD_detect',-10); | |
function fakepage_ABCD_detect($posts){ | |
global $wp; | |
global $wp_query; | |
global $fakepage_ABCD_detect; // used to stop double loading |
This file contains 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
// Class to create virtual pages | |
// http://davejesch.com/2012/12/creating-virtual-pages-in-wordpress/ | |
if (!class_exists('DJVirtualPage')) { | |
class DJVirtualPage { | |
private $slug = NULL; | |
private $title = NULL; | |
private $content = NULL; | |
private $author = NULL; | |
private $date = NULL; | |
private $type = NULL; |