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 | |
//=========================================================== Grab first paragraph (two if first is not long enough) | |
function get_first_two_paragraphs(){ | |
global $post; | |
$str = wpautop( get_the_content() ); | |
$psToGrab = 2; // number of paragraphs to get | |
$maxFirstParaLength = 200; // character max in first paragraph | |
$matches = array(); // matching elements will go here | |
$pattern = '%<p[^>]*>(.*?)</p>%i'; // match what's between all <p> tags | |
preg_match_all($pattern, $str, $matches); // do the regex match |
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
// [podsc url="069-work-for-yourself-or-for" hrtop="" hrbottom="" btn_top=""] | |
function podsc($atts) { | |
extract(shortcode_atts(array( | |
"url" => '', | |
"hrtop" => 'true', | |
"hrbottom" => 'true', | |
"btn_top" => '' | |
), $atts)); | |
// remove intro bits of URL if it's in the shortcode |
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
/* LAYOUT SIDEBAR HEADER/NAV FEATURE BOX TYPOGRAPHY/LINKS FOOTER GLOBAL*/ | |
/* =========================== LAYOUT =========================== */ | |
.custom #header { | |
} | |
.custom .full_width .page { | |
} | |
.custom #content { | |
} | |
.custom #sidebars { | |
} |
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 Meta Stuff | |
function custom_meta_stuff() { ?> | |
<?php } add_action('wp_head', 'custom_meta_stuff'); |
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 Header | |
remove_action('thesis_hook_header', 'thesis_default_header'); | |
function custom_header() { ?> | |
<?php } add_action('thesis_hook_header', 'custom_header'); |
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
//========================================================== Byline, Category on same line | |
function add_to_byline() { | |
if (!is_page()) { echo ' in <span>' . get_the_category_list(',') . '</span>'; } | |
} add_action('thesis_hook_byline_item', 'add_to_byline', '99'); |
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 | |
// thesis_nav_menu(); | |
// thesis_content_column(); | |
//=========================================================== CUSTOM META STUFF | |
function custom_meta_stuff() { ?> | |
<?php } add_action('wp_head', 'custom_meta_stuff'); | |
//=========================================================== CUSTOM HEADER | |
remove_action('thesis_hook_header', 'thesis_default_header'); |
OlderNewer