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 get_header(); ?> | |
<?php get_template_part( 'layouts/head', 'single' ); ?> | |
<?php get_template_part( 'content/article-header', 'single' ); ?> | |
<?php get_template_part( 'content/article-content', 'single' ); ?> | |
<?php get_template_part( 'content/article-footer', 'single' ); ?> | |
<?php get_sidebar(); ?> | |
<?php get_template_part( 'layouts/foot', 'single' ); ?> | |
<?php get_footer(); ?> |
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
<!-- demo: http://sandbox.squidplex.com/new/bootstrap/media.html --> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>Better Thumbnail Layouts</title> |
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 // Code awesomeness by Aaron Collegeman : https://github.com/collegeman ?> | |
<?php if ($foo = get_post_meta($post->ID, 'foo', true)) { ?> | |
<?php echo "<strong>{$foo}</strong>" ?> | |
<?php } ?> |
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
/** | |
* Youtube Shortcode Solution | |
* | |
* Set your desired width for all the videos on your site (below) | |
* Paste any Youtube video link in the shortcode, using this format, i.e.: | |
* [youtube value="http://www.youtube.com/watch?feature=player_embedded&v=GGT8ZCTBoBA"] | |
* This code will automatically resize your video to the appropriate size and aspect ratio. | |
* Modify the width value (set to 590 here), and the iframe code below to your desired settings. | |
* This requires coreylib (coreylib.com) | |
* Shortcode by coreyweb: https://github.com/coreyweb |
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 | |
$snap = 'http://s.wordpress.com/mshots/v1/'; | |
$url = 'http://www.squidoo.com'; | |
$alt = 'alt value'; | |
$width = '400'; | |
$height = '300'; | |
?> | |
<img src="<?php echo $snap . urlencode($url) ?>?w=<?php echo $width ?>&h=<?php echo $height ?>" alt="<?php echo $alt ?>" title="<?php echo $alt ?>" /> |
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 custom fields to user profiles | |
add_action( 'show_user_profile', 'my_show_extra_profile_fields' ); | |
add_action( 'edit_user_profile', 'my_show_extra_profile_fields' ); | |
function my_show_extra_profile_fields( $user ) { ?> | |
<h3>Extra profile information</h3> | |
<table class="form-table"> | |
<tr> | |
<th><label for="facebook">Facebook Profile</label></th> |
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 | |
// Set the lowest & highest numeric point in you series names of your includes files - example here is 1 and 4 | |
$sl = rand(1,4); | |
echo $sl; | |
?> |
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 | |
// Convert URL's with protocol prefix | |
$text = ereg_replace("[a-zA-Z]+://([-]*[.]?[a-zA-Z0-9_/-?&%])*", "<a href=\"\\0\">\\0</a>", $text); | |
//Convert URL with just www. | |
$text = ereg_replace("(^| |\n)(www([-]*[.]?[a-zA-Z0-9_/-?&%])*)", "\\1<a href=\"http://\\2\">\\2</a>", $text); | |
//Convert @ replies | |
$text = ereg_replace("(^| |\n)(\@([-]*[.]?[a-zA-Z0-9_/-?&%])*)", "\\1<a href=\"http://www.twitter.com/\\2\">\\2</a>", $text); | |
$text = str_replace("/@", "/", $text); |
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
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^domain-name\.com | |
RewriteCond %{HTTPS} =on | |
RewriteRule .* https://www.%{SERVER_NAME}%{REQUEST_URI} [R,L] | |
RewriteCond %{HTTP_HOST} ^domain-name\.com | |
RewriteCond %{HTTPS} !=on | |
RewriteRule .* http://www.%{SERVER_NAME}%{REQUEST_URI} [R,L] |
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
ErrorDocument 404 /404.php |
OlderNewer