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 | |
/** | |
* WordPress snippets, add to functions.php | |
* 1.) Enqueue Google Fonts | |
* 2.) Disbale emoji support | |
* 3.) Enqueue style sheets in a specific order | |
* 4.) Enqueue a single Javascript file correctly | |
* 5.) Enqueue jQuery correctly | |
*/ |
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 | |
/** | |
* Themes must declare support for the Featured Image function before | |
* the Featured Image interface will appear on the Edit screen. | |
* add_theme_support( 'post-thumbnails' ); | |
* https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ | |
*/ | |
?> | |
<?php if (has_post_thumbnail()): | |
$image_url = wp_get_attachment_image_src( get_post_thumbnail_id()); |
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 | |
/* | |
* Set a different Wordpress Admin Color Scheme for each development environment. | |
* Add this function to the Wordpress functions.php file and make the necessary | |
* changes to $hosts array(). | |
* Wordpress Default Admin Color themes: default, light, blue, coffee, ectoplasm, midnight, ocean, sunrise | |
*/ | |
function custom_env_admin_themes(){ | |
//Change the host name and add additional hosts as key/value pairs to this array. |
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
.gform_wrapper ul { | |
@extend .list-unstyled; | |
} | |
.gform_wrapper li { | |
@extend .form-group; | |
} | |
.gform_wrapper form { | |
margin-bottom: 0; | |
} | |
.gform_wrapper .gfield_required { |
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 | |
/** | |
* Display a list of Worpress pages with Bootstrap rows and columns markup. This example has 3 items to a row. (3 by N number of rows) | |
*/ | |
$pages = get_posts(array( 'orderby' => 'menu_order', 'post_type' => 'pages', 'numberposts' => -1, 'order'=> 'ASC' )); | |
$totalpages = count($pages); | |
$count =0; | |
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
# This is a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your |