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
/* Use the fa-spin class to get any icon to rotate. */ | |
<i class="fa fa-spinner fa-spin"></i> | |
<i class="fa fa-circle-o-notch fa-spin"></i> | |
<i class="fa fa-refresh fa-spin"></i> | |
<i class="fa fa-cog fa-spin"></i> |
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
/* To increase icon sizes relative to their container, use the fa-lg (33% increase), fa-2x, fa-3x, fa-4x, or fa-5x classes. */ | |
<i class="fa fa-thumbs-up fa-lg"></i> | |
<i class="fa fa-thumbs-up fa-2x"></i> | |
<i class="fa fa-thumbs-up fa-3x"></i> | |
<i class="fa fa-thumbs-up fa-4x"></i> | |
<i class="fa fa-thumbs-up fa-5x"></i> |
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
<i class="fa fa-thumbs-up"></i> |
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 | |
// I hope this can help out someone else so they don't go though the same frustration that I did. I was trying to use the taxonomy_select | |
// metabox to display two dropdowns/select boxes but couldn't get them both to save. Saving or updating would force both to save as the | |
// second value. Below is the code that I used to allow me to save the data separately into usable post meta. If you are using this with | |
// multiple selects there is still no need to create more then one function, this will work on all of them. | |
// I first created a function outside the metabox to loop though my custom taxonomy. | |
function get_team_names( $taxonomy = 'team_category', $args = array() ) { |
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 // Be sure not to add the opening php tag | |
function enqueue_font_awesome() { | |
wp_enqueue_style( 'icon-fonts', '//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css', array(), CHILD_THEME_VERSION ); | |
} | |
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' ); |
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 | |
function replace_text_wps($text){ | |
$replace = array( | |
// Choose the words to replace & what to replace it with | |
'plugindrawer' => '<a href="http://plugindrawer.com/myafflink">plugindrawer</a>', | |
'backupbuddy' => '<a href="http://ithemes.com/myafflink">backupbuddy</a>' | |
); | |
$text = str_replace(array_keys($replace), $replace, $text); | |
return $text; | |
} |
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
Posted <?php echo human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ago'; |
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 Custom Post Type Taxonomies To At A Glance Dashboard Widget | |
function add_post_type_tax_to_right_now() { | |
$args = array( | |
'public' => true , | |
'_builtin' => false | |
); | |
$output = 'object'; | |
$operator = 'and'; | |
$taxonomies = get_taxonomies( $args , $output , $operator ); |
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 Custom Post Type to At A Glance Dashboard Widget | |
function add_post_type_to_right_now() { | |
$args = array( | |
'public' => true , | |
'_builtin' => false | |
); | |
$output = 'object'; | |
$operator = 'and'; | |
$post_types = get_post_types( $args , $output , $operator ); |
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 | |
// Hide your WordPress version | |
remove_action('wp_head', 'wp_generator'); | |
?> |
NewerOlder