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 WordPress Login Logo | |
function login_css() { | |
wp_enqueue_style( 'login_css', get_template_directory_uri() . '/css/login.css' ); | |
} | |
add_action('login_head', 'login_css'); |
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 | |
/* Add Class to first Paragraph in WordPress the_content(); | |
Source: http://webdevbits.com/wordpress/add-class-to-first-paragraph-in-wordpress-the_content/ | |
------------------------------------------------------------------------------------------- */ | |
function first_paragraph($content){ | |
if ( is_page() || ('school' == get_post_type() ) ) { | |
return preg_replace('/<p([^>]+)?>/', '<p$1>', $content, 1); | |
} else { | |
return preg_replace('/<p([^>]+)?>/', '<p$1 class="intro">', $content, 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
/** | |
* Extended Walker class for use with the | |
* Twitter Bootstrap toolkit Dropdown menus in Wordpress. | |
* Edited to support n-levels submenu. | |
* @author johnmegahan https://gist.github.com/1597994, Emanuele 'Tex' Tessore https://gist.github.com/3765640 | |
*/ | |
class BootstrapNavMenuWalker extends Walker_Nav_Menu { | |
function start_lvl( &$output, $depth ) { |
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 class removes the default excerpt metabox | |
* and adds a new box with the wysiwyg editor capability | |
* @author etessore | |
*/ | |
class TinyMceExcerptCustomization{ | |
const textdomain = ''; | |
const custom_exceprt_slug = '_custom-excerpt'; | |
var $contexts; |
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 // Add Lightbox to Wordpress Gallery | |
add_filter( 'wp_get_attachment_link', 'prettyPhoto'); | |
function prettyPhoto ($content) { | |
$content = preg_replace("/<a/","<a rel=\"prettyPhoto[slides]\" class=\"preloader\"",$content,1); | |
return $content; | |
} ?> |
NewerOlder