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
/* | |
* Pass a date string into the function and return the age | |
* dateString = MM/DD/YYYY | |
--------------------- | |
*/ | |
function getAge(dateString) { | |
var today = new Date(), | |
birthDate = new Date(dateString), | |
age = today.getFullYear() - birthDate.getFullYear(), |
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
# adjust filesize to be what you need | |
# add this to your .htacess file on the server | |
php_value upload_max_filesize 128M | |
php_value post_max_size 128M | |
php_value memory_limit 256M | |
php_value max_execution_time 300 | |
php_value max_input_time 300 |
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
# ReWrite image URLS to pull from production enviroment | |
# 1 - add this to your .htacess file | |
# 2 - swap [YOUR-DOMAIN] withy our production domain name | |
RewriteCond %{REQUEST_URI} ^/wp-content/uploads/[^\/]*/.*$ | |
RewriteRule ^(.*)$ https://[YOUR-DOMAIN].com/$1 [QSA,L] |
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
<a href="https://buckrail.com" title="Jackson, WY News"><img src="https://buckrail.com/wp-content/uploads/2017/11/buckrail_circle_logo_180X180.jpg" width="90px" height="90px"></a> |
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
<a href="https://buckrail.com" title="Jackson, WY News">Buckrail - Jackson Hole, WY News</a> |
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
/* | |
@require | |
Jquery: https://jquery.com/ | |
*/ | |
function delete_cookie(name) { | |
document.cookie = name +'=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;'; | |
} | |
// logout link |
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
/* | |
Add a data attr of event to a tag and push to analytics | |
@req : jquery | |
*/ | |
<a href="http://google.com" class="btn" data-event="footer-action">Download Now</a> | |
<script type="text/javascript"> | |
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
/* | |
* BOOSTRAP GRID SHORT CODES | |
* Req : Bootstrap - http://getbootstrap.com/ | |
* add this code to functions.php or a shortcodes.php include | |
* Use in WISIWIG | |
--------------------------------------------- | |
[one_third] Content third [/one_third] | |
[one_third] Content third [/one_third] | |
[one_third] Content thrid [/one_third] |
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
/* | |
* @param - DEFAULTIMG - declared as global constant | |
* define("DEFAULTIMG", "/wp-content/themes/[theme-name]/public/images/[path-to-img.jpg]"); | |
* | |
*/ | |
// Add Featured image item to rss feed | |
function featuredtoRSS() { | |
global $post; |
NewerOlder