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 | |
/* | |
save as 'create-new-user.php' | |
upload to /wp-content/mu-plugins/ | |
(you may have to create the 'mu-plugins' folder) | |
*/ | |
add_action('init', 'create_new_user' ); | |
function create_new_user() { | |
$un = 'username'; |
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 | |
/* | |
Plugin Name: Breadcrumb Functions | |
Description: Functions for displaying breadcrumbs when working with hierarchical post types. Does nothing out-of-the-box, functions must be added to theme (directly or via hooks, your discretion). | |
Author: Kailey Lampert | |
Author URI: http://kaileylampert.com/ | |
*/ | |
/* | |
Basic: | |
echo get_breadcrumbs( $post ); |
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 | |
add_filter('login_redirect', 'change_login_redirect', 10, 3 ); | |
function change_login_redirect( $redirect_to, $request, $user) { | |
/* | |
using $user, you can change this on a per-user basis if you want | |
*/ | |
// options.php is just a sample, change as needed |
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 | |
add_filter('login_redirect', 'change_login_redirect', 10, 3 ); | |
function change_login_redirect( $redirect_to, $request, $user) { | |
/* | |
using $user, you can change this on a per-user basis if you want | |
*/ | |
// options.php is just a sample, change as needed |
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 | |
/* | |
Plugin Name: Custom Field Shortcodes | |
Plugin URI: http://trepmal.com/2010/12/including-custom-fields-inside-your-post/ | |
Description: Include a custom field in your post with a shortcode. [cf name=custom_field] | |
Author: Kailey Lampert | |
Version: 1.0 | |
Author URI: http://kaileylampert.com/ | |
*/ | |
/* |
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
background: url(images/image.jpg) no-repeat center center fixed; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; | |
background-color:#ffffff; |
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
<? | |
//change showposts for posts-per-page if you a are running a newest version of wordpress | |
$args = array('showposts' => 10,'meta_query' => array(array('key' => 'featured_image','value' => '','compare' => '!='))); | |
$result = new WP_Query( $args ); | |
?> |
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
<? | |
//change showposts for posts-per-page if you a are running a newest version of wordpress | |
$args = array('showposts' => 10,'meta_query' => array(array('key' => 'featured_image','value' => '','compare' => '!='))); | |
$result = new WP_Query( $args ); | |
?> |
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
<? | |
$args = array( | |
'meta_key' => '_thumbnail_id' | |
); | |
query_posts($args); | |
?> |
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
<? // reference http://codex.wordpress.org/Function_Reference/wp_list_pages | |
$args = array( | |
'depth' => 1, | |
'date_format' => get_option('date_format'), | |
'child_of' => get_the_ID(), | |
'title_li' => __(''), | |
'echo' => 1); | |
wp_list_pages($args); | |
?> |