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
//Hiding WP Version | |
function so_remove_version() { | |
return ''; | |
} | |
add_filter('the_generator', 'so_remove_version'); |
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
// Disable use XML-RPC | |
add_filter( 'xmlrpc_enabled', '__return_false' ); | |
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
//Disable PingBack | |
add_filter( 'xmlrpc_methods', 'so_remove_ping' ); | |
function so_remove_ping( $methods ) { | |
unset( $methods['pingback.ping'] ); | |
unset( $methods['pingback.extensions.getPingbacks'] ); | |
return $methods; | |
} | |
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
function _remove_script_version( $src ){ | |
$parts = explode( '?ver', $src ); | |
return $parts[0]; | |
} | |
add_filter( 'script_loader_src', '_remove_script_version', 15, 1 ); | |
add_filter( 'style_loader_src', '_remove_script_version', 15, 1 ); |
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
//Enable HTML Compression | |
class WP_HTML_Compression | |
{ | |
// Settings | |
protected $compress_css = true; | |
protected $compress_js = true; | |
protected $info_comment = true; | |
protected $remove_comments = true; | |
// Variables |
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
/* reset styles */ | |
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, | |
small, strike, strong, sub, sup, tt, var, b, u, i, center, | |
dl, dt, dd, ol, ul, li, fieldset, form, label, legend, | |
table, caption, tbody, tfoot, thead, tr, th, td { | |
margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; | |
vertical-align: baseline; background: transparent; | |
} | |
body { line-height: 1; } |
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
<!DOCTYPE html> | |
<html class="no-js" <?php language_attributes(); ?>> | |
<head> | |
<meta charset=<?php bloginfo('charset'); ?>> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="description" content="<?php bloginfo('description'); ?> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<title> | |
<?php echo home_url(); ?><?php bloginfo('name'); ?> |
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
<?php | |
/* | |
Template Name: Blog | |
*/ | |
?> | |
<?php get_header(); ?> | |
<article> | |
<?php // Display blog posts on any page @ http://m0n.co/l | |
$temp = $wp_query; $wp_query= null; |
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
// Custom Widget Area | |
if (function_exists('register_sidebar')) { | |
register_sidebar(array( | |
'name' => 'Sidebar 1', | |
'id' => 'sidebar1', | |
'description' => 'This is the widgetized sidebar1', | |
'before_widget' => '<div id="%1$s" class="widget-container %2$s">', | |
'after_widget' => '</div>', | |
'before_title' => '<h1>', |
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
//Embed Images | |
function get_images_from_media_library() { | |
$args = array( | |
'post_type' => 'attachment', | |
'post_mime_type' =>'image', | |
'post_status' => 'inherit', | |
'posts_per_page' => 5, | |
'orderby' => 'rand' | |
); | |
$query_images = new WP_Query( $args ); |