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
<div class="tabbable"> | |
<ul class="nav nav-tabs"> | |
<li class="active"><a href="#pane1" data-toggle="tab">Tab 1</a></li> | |
<li><a href="#pane2" data-toggle="tab">Tab 2</a></li> | |
<li><a href="#pane3" data-toggle="tab">Tab 3</a></li> | |
<li><a href="#pane4" data-toggle="tab">Tab 4</a></li> | |
</ul> | |
<div class="tab-content"> | |
<div id="pane1" class="tab-pane active"> | |
<h4>The Markup</h4> |
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
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
# Replace http://stevegrunwell.com with your production site's domain name | |
RewriteRule (.*) http://stevegrunwell.com/wp-content/uploads/$1 | |
</IfModule> |
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
/************* Display the page or post slug *****************/ | |
function get_the_slug( $id=null ){ | |
if( empty($id) ): | |
global $post; | |
if( empty($post) ) | |
return ''; // No global $post var available. | |
$id = $post->ID; | |
endif; | |
$slug = basename( get_permalink($id) ); |
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
Disallow: /cgi-bin/ | |
Disallow: /wp-admin/ | |
Disallow: /wp-includes/ | |
Disallow: /wp-content/plugins/ | |
Disallow: /wp-content/cache/ | |
Disallow: /wp-content/themes/ | |
Allow: /wp-content/uploads/ |
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
define('WP_DEBUG', true); | |
define('WP_DEBUG_LOG', true); | |
define('WP_DEBUG_DISPLAY', false); | |
@ini_set('display_errors', 0); |
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
jQuery.fn.fadeOutAndRemove = function(speed){ | |
$(this).fadeOut(speed,function(){ | |
$(this).remove(); | |
}) | |
} | |
// And then: Somewhere in the program code. | |
$('div').fadeOutAndRemove('fast'); |
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
# Apache Server Configs v2.2.0 | MIT License | |
# https://github.com/h5bp/server-configs-apache | |
# (!) Using `.htaccess` files slows down Apache, therefore, if you have access | |
# to the main server config file (usually called `httpd.conf`), you should add | |
# this logic there: http://httpd.apache.org/docs/current/howto/htaccess.html. | |
# ------------------------------------------------------------------------------ |
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
# 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 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
<?php | |
$string = $post->post_content; | |
$newString = substr($string, 0, 100); | |
echo $newString; | |
?> |