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
@mixin animation($value){ | |
-webkit-animation: #{$value}; | |
-moz-animation: #{$value}; | |
-ms-animation: #{$value}; | |
-o-animation: #{$value}; | |
animation: #{$value}; | |
} |
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 | |
//for use in the loop, list 5 post titles related to first tag on current post | |
$tags = wp_get_post_tags($post->ID); | |
$tag_in = array(); | |
foreach($tags as $tag): | |
setup_postdata($tag); | |
$tag_in[] = $tag->slug; | |
endforeach; | |
$the_tags = implode(",", $tag_in); //Create | |
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
//Remove Customize.php | |
function remove_sub_menus () { | |
remove_submenu_page('themes.php', 'customize.php'); //Customize | |
} | |
add_action('admin_menu', 'remove_sub_menus'); |
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
::-webkit-scrollbar { width: 10px; color: #a3a499; } | |
::-webkit-scrollbar-track { background-color: #ecede3; border-radius: 10px; border: 1px solid #d8d9cf; } | |
::-webkit-scrollbar-thumb { border-radius: 10px; background-color: #a3a499; } |
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
$url = $_SERVER['REQUEST_URI']; | |
$parts = parse_url($url); | |
parse_str($parts['query'], $query); | |
$term = $query['term']; | |
$q1 = get_posts(array( | |
'post_type' => 'project', | |
'posts_per_page' => -1, | |
's' => $term, | |
)); |
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
//Hide admin bar | |
// Place in functions.php | |
global $current_user; | |
get_currentuserinfo(); | |
if ( user_can( $current_user, "subscriber" ) ){ | |
add_filter('show_admin_bar', '__return_false'); | |
} |
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
function get_page_id($page_name){ | |
global $wpdb; | |
$sql = 'SELECT ID FROM '.$wpdb->posts.' LEFT JOIN '.$wpdb->wp_icl_translations.' WHERE post_name = "'.$page_name.'" AND language_code = "'.ICL_LANGUAGE_CODE.'"'; | |
$page_name = $wpdb->get_var($sql); | |
return $page_name; | |
} |
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
[wp_ajax_login] |
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 | |
$title = get_the_title(); | |
$title_keys= explode(" ",$term); | |
$title = preg_replace('/('.implode('|', $title_keys) .')/iu', '<span class="highlight">\0</span>', $title); | |
echo $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 | |
$features = array('1, 1530', '1514', '1471'); // Array of posts | |
if($features){ | |
//Implode the posts and set a varible to pass to our exclude param. | |
$post__not_in = implode(",", $features); | |
} | |
echo do_shortcode('[ajax_load_more post__not_in="'.$post__not_in.'"]'); | |
?> |
OlderNewer