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 | |
/** | |
* Maintenance WordPress file | |
* | |
* Rename this file to .maintenance and | |
* Wordpress will enter maintenance mode. | |
* | |
* It will look for a "maintenance.php" | |
* file inside wp-contents folder | |
* |
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
<!-- HTML image tag with 1px x 1px transparent GIF --> | |
<img alt="Transparent GIF" class="svg-icon" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"> | |
<!-- CSS code --> | |
img.svg-icon { | |
width: 100px; | |
height: 100px; |
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> | |
<head> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script src="jquery.ketchup.all.min.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<div id="email"> | |
<span>Enter your email to sign up</span> | |
<form action="/subscribe.php" id="invite" method="POST"> |
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
# This is a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your |
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
<IfModule mod_deflate.c> | |
#The following line is enough for .js and .css | |
AddOutputFilter DEFLATE js css | |
AddOutputFilterByType DEFLATE text/plain text/xml application/xhtml+xml text/css application/xml application/rss+xml application/atom_xml application/x-javascript application/x-httpd-php application/x-httpd-fastphp text/html | |
#The following lines are to avoid bugs with some browsers | |
BrowserMatch ^Mozilla/4 gzip-only-text/html | |
BrowserMatch ^Mozilla/4\.0[678] no-gzip | |
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html | |
</IfModule> |
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
How to Use | |
Step 1. | |
Copy the custom_widget.php file and place it in your WordPress theme folder. Assuming WordPress is installed in the root of your server the file will be place in /wp-content/themes/yourtheme/ | |
Step 2. | |
Open up functions.php and include the following piece of code somewhere in the file. include TEMPLATEPATH . '/custom_widget.php'; | |
Step 3. | |
Edit the custom_widget.php file to suit your needs. |
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
/** | |
* Add CTA widget support for site. If widget not active, don't display | |
* | |
*/ | |
function mp_cta_genesis() { | |
// Don't display the CTA on the home page, since it's built into the MP theme | |
if ( is_home() ) { | |
return; | |
} |
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 | |
/* | |
Plugin Name: Image P tag remover | |
Description: Plugin to remove p tags from around images and iframes in content outputting, after WP autop filter has added them. (oh the irony) | |
Version: 1.1 | |
Author: Fublo Ltd | |
Author URI: http://blog.fublo.net/2011/05/wordpress-p-tag-removal/ | |
*/ | |
function filter_ptags_on_images($content) |
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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/query.php | |
*/ | |
$args = array( |
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
add_filter('post_thumbnail_html', 'slug_responsive_img', 5, 5); | |
//Image sizes for Interchange | |
add_image_size( 'fd-lrg', 1024, 99999); | |
add_image_size( 'fd-med', 768, 99999); | |
add_image_size( 'fd-sm', 320, 9999); | |
function slug_responsive_img($html, $post_id, $post_thumbnail_id, $size, $attr) { | |
//make image links | |
$attachment_id = $post_thumbnail_id; | |
$default = wp_get_attachment_image_src($attachment_id); |
OlderNewer