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);| <?php | |
| // @link http://www.jaredatchison.com/code/add-next-previous-post-links-genesis/ | |
| // Check if there are next or previous posts | |
| // First paramter is 'in_same_term'?, make sure it matches third parameter in previous_post_link / next_post_link (which defaults to false) | |
| $next = get_adjacent_post( false, '', false ); | |
| $previous = get_adjacent_post( false, '', true ); | |
| //Set up CSS styles to know if there are next or previous posts only |
| //* http://www.codemyownroad.com/add-currency-code-suffix-prices-woocommerce/ | |
| // Location: add to functions.php | |
| // Output: displays $0.00 AUD on all pages | |
| function addPriceSuffix($format, $currency_pos) { | |
| switch ( $currency_pos ) { | |
| case 'left' : | |
| $currency = get_woocommerce_currency(); | |
| $format = '%1$s%2$s ' . $currency; | |
| break; |
| class Text_Editor_Custom_Control extends WP_Customize_Control | |
| { | |
| public $type = 'textarea'; | |
| /** | |
| ** Render the content on the theme customizer page | |
| */ | |
| public function render_content() { ?> | |
| <label> | |
| <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> | |
| <?php |
| /* ~/Library/KeyBindings/DefaultKeyBinding.Dict | |
| This file remaps the key bindings of a single user on Mac OS X 10.5 to more | |
| closely match default behavior on Windows systems. This makes the Command key | |
| behave like Windows Control key. To use Control instead of Command, either swap | |
| Control and Command in Apple->System Preferences->Keyboard->Modifier Keys... | |
| or replace @ with ^ in this file. | |
| Here is a rough cheatsheet for syntax. | |
| Key Modifiers |
| <?php | |
| add_filter( 'theme_page_templates', 'rrwd_remove_page_template' ); | |
| function rrwd_remove_page_template( $pages_templates ) { | |
| unset( $pages_templates['page_blog.php'] ); | |
| unset( $pages_templates['page_archive.php'] ); | |
| return $pages_templates; | |
| } | |
| ?> |
| add_action( 'genesis_before_comments' , 'webendev_comment_count' ); | |
| /** | |
| * Add comment count and remove standard comment title | |
| * | |
| */ | |
| function webendev_comment_count () { | |
| add_filter( 'genesis_title_comments', '_return_null' ); | |
| if ( is_single() ) { | |
| if ( have_comments() ) { | |
| echo '<h3>'; |
| <?php | |
| // Exclude 'example' category from your blog | |
| function my_get_terms_args_exclude( $args, $taxonomies ) { | |
| if (!is_admin()) { | |
| $cat = get_category_by_slug( 'example' ); | |
| if ( is_object( $cat ) ) { | |
| $args['exclude'] = $cat->term_id; | |
| } | |
| } |
| <?php | |
| /** | |
| * Check if a meta box has been registered. | |
| * Returns true if the supplied meta box id has been registered. false if not. | |
| * Note that this does not check what page type | |
| * @param String $meta_box_id An id for the meta box. | |
| * @param String $post_type The post type the box is registered to (optional) | |
| * @return mixed Returns boolean or a WP_Error if $wp_meta_boxes is not yet set. | |
| */ |