Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Edward Edwardtonnn

🎯
Focusing
  • Los Angeles Web Club
  • South Gate, CA
View GitHub Profile
@Edwardtonnn
Edwardtonnn / wp-config.php
Created Jun 3, 2020
Allows all type of file to be uploaded
View wp-config.php
define('ALLOW_UNFILTERED_UPLOADS', true);
@Edwardtonnn
Edwardtonnn / .htaccess
Created Nov 22, 2019
htaccess rewrite
View .htaccess
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]
@Edwardtonnn
Edwardtonnn / copyright-year.php
Created Sep 13, 2019
Copyright automatically update year for WP footer
View copyright-year.php
View alineAnimationGSAP.js
// Scroll to top color change
// function preLoaderStart() {
// // ST0 is the green portion of Aline Logo
// var ali_green = document.getElementsByClassName('st0'),
// ali_grey = document.getElementsByClassName('st1'),
// preloader = document.getElementsByClassName('container-preloader'),
// tl = new TimelineLite();
// if ($('body').hasClass("home")) {
// // Only plays Once Per Session
@Edwardtonnn
Edwardtonnn / style.css
Created Sep 2, 2019
Los Angeles Web Club CSS files
View style.css
.site-title a{display:none}@font-face{font-family:"Courier";src:url("/fonts/CourierNewPSMT.eot");src:url("/fonts/CourierNewPSMT.svg") format("svg"),url("/fonts/CourierNewPSMT.woff2") format("woff2"),url("/fonts/CourierNewPSMT.woff") format("woff")}h1.h1-intro{font-size:8rem;font-weight:900;text-align:center}@media(max-width: 960px){h1.h1-intro{font-size:4rem}}h2.h2-subtext{color:#fff;font-size:1.5rem;text-align:center;text-transform:uppercase;letter-spacing:5px}header.site-header{background:transparent;position:absolute}header.site-header .wrap{display:flex;justify-content:space-between;align-items:center}@media(max-width: 960px){header.site-header .wrap{display:block}}header.site-header .wrap:before,header.site-header .wrap:after{display:none}.main-logo{height:75px;width:100%}nav#genesis-nav-primary li a{font-family:"Courier New";font-size:1rem;color:#f5ad03}nav#genesis-nav-primary li a:hover{background:#f5ad03;color:#fff}#genesis-mobile-nav-primary{color:#f5ad03}.bg-blue{background:#002a42}.blue{color:#002a
View script.js
<script type='text/javascript'>
jQuery(document).bind('gform_post_render', function(event, formId, currentPage){if(formId == 2) {gformInitCurrencyFormatFields('#input_2_20,#input_2_21');if(typeof Placeholders != 'undefined'){
Placeholders.enable();
}jQuery('#input_2_16').mask('(999) 999-9999').bind('keypress', function(e){if(e.which == 13){jQuery(this).blur();} } );} } );jQuery(document).bind('gform_post_conditional_logic', function(event, formId, fields, isInit){} );</script><script type='text/javascript'>jQuery(document).ready(function(){jQuery(document).trigger('gform_post_render', [2, 1]) } );</script><!-- call the jQuery library if not already loaded in theme --> <!-- the function to show the error notice or the fading confirmation notice at top of page --> <script type="text/javascript">jQuery(document).ready(function(){
jQuery(".validation_message").appendTo(".validation_error");
jQuery("[id*='field_2_'] ").removeClass("gfield_error");
jQuery("[id*='field_3
View functions.php
<?php
function currentYear( $atts ){
return date('Y');
}
add_shortcode( 'year', 'currentYear' );
//To use the shortcode
[year]
@Edwardtonnn
Edwardtonnn / functions.php
Created May 15, 2019
Enqueue Style the simple way
View functions.php
<?php
// To enqueue style.css
wp_enqueue_style( 'style', get_stylesheet_uri() );
@Edwardtonnn
Edwardtonnn / index.html
Created May 14, 2019
Popup Maker Shortcode Example
View index.html
[popup_trigger id="49644" tag="span" class="download-button"]Download Now[/popup_trigger]
View functions.php
<?php
// Breadcrumbs
function custom_breadcrumbs() {
// Settings
$separator = '&gt;';
$breadcrums_id = 'breadcrumbs';
$breadcrums_class = 'breadcrumbs';
$home_title = 'Homepage';