Exclude pages filter

function exclude_pages($pages){
//Use if no pages are excluded yet
$pages = array(39,40);

/*
//Use this for adding pages to exclude
$exclude = 212;
array_push($pages,$exclude);
*/
return $pages;
}
add_filter('wp_list_pages_excludes','exclude_pages');

AJAX Refreshing DIV

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

<script type="text/javascript">
$(document).ready(function() {
$.ajaxSetup({ cache: false }); // This part addresses an IE bug. without it, IE will only load the first number and will never refresh
setInterval(function() {
$('#divToRefresh').load('/path/to/your/php/file/userCount.php');
}, 3000); // the "3000" here refers to the time to refresh the div. it is in milliseconds.
});
</script>

<?php
require "/path/to/your/database/connection/connection.php";
$userCount = mysql_query( "SELECT * FROM users" ) or die("SELECT Error: ".mysql_error());
$numRows = mysql_num_rows($userCount);
echo $numRows;
?>

<div id="divToRefresh"></div>

YouTube show user videos

<h3>All Videos</h3>
<?php

//Get Query Feeds
$query = $yt->newVideoQuery();
$query->setAuthor('USERNAMEHERE');
$query->setCategory('Music');

$videoFeed = $yt->getVideoFeed($query);

$counter = 1;
foreach($videoFeed as $videoEntry) {
echo $counter . " - " . $videoEntry->getVideoTitle() . ' ~ ' . $videoEntry->getVideoId() . '<br>';
$counter++;
}
?>

Get browser window size

function ezGetWidth(){
var x = 0;
if(self.innerHeight) x = self.innerWidth;
else if(document.documentElement && document.documentElement.clientHeight) x = document.documentElement.clientWidth;
else if(document.body) x = document.body.clientWidth;
return x;
}

function ezGetHeight(){
var y = 0;
if(self.innerHeight) y = self.innerHeight;
else if(document.documentElement && document.documentElement.clientHeight) y = document.documentElement.clientHeight;
else if(document.body) y = document.body.clientHeight;
return y;
}

Create page with php

<?php

$page_check = get_page_by_title('My New Page');
$page_check_id = $page_check->ID;

$new_page = array(
'post_type' => 'page',
'post_title' => 'My New Page',
'post_content' => 'This is my new page',
'post_status' => 'publish',
'post_author' => 1,
);

if(!isset($page_check_id)){
wp_insert_post($new_page);
$new_page_data = get_page_by_title('My New Page');
$new_page_id = $new_page_data->ID;
update_post_meta($new_page_id, '_wp_page_template','template-video.php');
}

//This version works as an engine for creating many pages by running through one function.  The page title is used for the page template file name so: 'Audio Admin' will be tied to the template named template-audioadmin.php

$default_pages = array('Audio Admin','Video Admin');
foreach($default_pages as $page){
$page_check = get_page_by_title($page);
$page_check_id = $page_check->ID;
if(!isset($page_check_id)) lmcb_create_pg($page);
}
function lmcb_create_pg($title){
$new_page = array(
'post_type' => 'page',
'post_title' => $title,
'post_status' => 'publish',
'post_author' => 1,
);
wp_insert_post($new_page);
$new_page_data = get_page_by_title($title);
$new_page_id = $new_page_data->ID;
$lower_title = strtolower($title);
$template_file = 'template-' . str_replace(' ','',$lower_title) . '.php';
echo $template_file;
update_post_meta($new_page_id, '_wp_page_template',$template_file);
}

?>