A mixin for writing @font-face rules in SASS.
Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.
@include font-face(Samplino, fonts/Samplino);| // completely disable image size threshold | |
| add_filter( 'big_image_size_threshold', '__return_false' ); | |
| // increase the image size threshold to 3000px | |
| function gc_big_image_size_threshold( $threshold ) { | |
| return 3000; // new threshold | |
| } | |
| add_filter('big_image_size_threshold', 'gc_big_image_size_threshold', 999, 1); |
| <?php | |
| /** | |
| * For debug | |
| * show template file name | |
| * ---------------------------------------------------------*/ | |
| function show_template() { | |
| global $template; | |
| echo basename( $template ); | |
| } |
| /* cleaup*/ | |
| remove_action( 'wp_head', 'feed_links_extra', 3 ); // Display the links to the extra feeds such as category feeds | |
| remove_action( 'wp_head', 'feed_links', 2 ); // Display the links to the general feeds: Post and Comment Feed | |
| remove_action( 'wp_head', 'rsd_link' ); // Display the link to the Really Simple Discovery service endpoint, EditURI link | |
| remove_action( 'wp_head', 'wlwmanifest_link' ); // Display the link to the Windows Live Writer manifest file. | |
| remove_action( 'wp_head', 'index_rel_link' ); // index link | |
| remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); // prev link | |
| remove_action( 'wp_head', 'start_post_rel_link', 10, 0 ); // start link | |
| remove_action( 'wp_head', 'adjacent_posts_rel_link', 10, 0 ); // Display relational links for the posts adjacent to the current post. |
| <?php | |
| // Debug | |
| //Activate log files in wp-config.php | |
| define( 'WP_DEBUG', true ); // Enabling WP_DEBUG will cause all PHP errors, notices and warnings to be displayed. | |
| define( 'WP_DEBUG_LOG', true ); // Enable Debug logging to the /wp-content/debug.log file | |
| define( 'WP_DEBUG_DISPLAY', true ); // Controls whether debug messages are shown inside the HTML of pages or not. | |
| // use this | |
| define( 'WP_DEBUG', true ); | |
| define( 'WP_DEBUG_LOG', true ); |
| <?php | |
| function excerpt($limit) { | |
| $excerpt = explode(' ', get_the_excerpt(), $limit); | |
| if (count($excerpt)>=$limit) { | |
| array_pop($excerpt); | |
| $excerpt = implode(" ",$excerpt).'...'; | |
| } else { | |
| $excerpt = implode(" ",$excerpt); | |
| } |
| <?php | |
| /** | |
| * [list_searcheable_acf list all the custom fields we want to include in our search query] | |
| * @return [array] [list of custom fields] | |
| */ | |
| function list_searcheable_acf(){ | |
| $list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF"); | |
| return $list_searcheable_acf; | |
| } |
| // | |
| <?php | |
| if ( has_post_thumbnail() ) { | |
| echo wp_get_attachment_image(get_post_thumbnail_id($post->ID), '', false, array('class' => 'featured-image')); | |
| } else { | |
| echo '<img src="' . get_bloginfo( 'stylesheet_directory' ) | |
| . '/library/images/thumbnail-default.jpg" alt="default thumb" class="featured-image"/>'; | |
| } | |
| ?> |
| Sass Mixin for typekit variation-specific font-family names | |
| Typekit IE6-8 Support (http://help.typekit.com/customer/portal/articles/6855-Using-multiple-weights-and-styles) | |
| $lucida-grande: "Lucida Grande", Tahoma, Verdana, Arial, sans-serif; | |
| $georgia: Georgia, Cambria, "Times New Roman", Times, serif; | |
| // Must include fallbacks for EACH typekit font — set them each as variables | |
| //************************************************************************// | |
| $typekit-fonts: "source-sans-pro", "ff-tisa-web-pro"; // index [1, 2] |
| // Placeholder @mixin for Sass | |
| // | |
| // A mixin to style placeholders in HTML5 form elements. | |
| // Includes also a .placeholder class to be used with a polyfill e.g. | |
| // https://github.com/mathiasbynens/jquery-placeholder | |
| // Requires Sass 3.2. | |
| // | |
| // Example usage (.scss): | |
| // | |
| // input { |