Skip to content

Instantly share code, notes, and snippets.

View Edwardtonnn's full-sized avatar
🎯
Focusing

Edward Edwardtonnn

🎯
Focusing
  • Los Angeles Web Club
  • South Gate, CA
View GitHub Profile
// 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 September 2, 2019 02:49
Los Angeles Web Club CSS files
.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
<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
<?php
function currentYear( $atts ){
return date('Y');
}
add_shortcode( 'year', 'currentYear' );
//To use the shortcode
[year]
@Edwardtonnn
Edwardtonnn / functions.php
Created May 15, 2019 17:22
Enqueue Style the simple way
<?php
// To enqueue style.css
wp_enqueue_style( 'style', get_stylesheet_uri() );
@Edwardtonnn
Edwardtonnn / index.html
Created May 14, 2019 20:56
Popup Maker Shortcode Example
[popup_trigger id="49644" tag="span" class="download-button"]Download Now[/popup_trigger]
<?php
// Breadcrumbs
function custom_breadcrumbs() {
// Settings
$separator = '&gt;';
$breadcrums_id = 'breadcrumbs';
$breadcrums_class = 'breadcrumbs';
$home_title = 'Homepage';
@Edwardtonnn
Edwardtonnn / custom.js
Last active March 28, 2019 20:32
enqueue scripts
(function($) {
// $ Works! You can test it with next line if you like
console.log("Custom JS Running");
})( jQuery );
@Edwardtonnn
Edwardtonnn / functions.php
Last active February 1, 2019 05:03
Enqueu Style w Timestamp
<?php
function load_style(){
// How to load an external style
wp_enqueue_style('fonts-css', 'https://fonts.googleapis.com/css?family=Open+Sans|Valera+Round');
// How to load internal stylesheet
// Notice the get the time parameter near the end. This allows for clearly identifying when the css file has been loaded
// Only use get_the_time() when in development
wp_enqueue_style( 'main', get_stylesheet_uri(), ['font-css'], get_the_time());
@Edwardtonnn
Edwardtonnn / functions.php
Created January 25, 2019 23:21
Custome author name without creating new users
<?php
// This snippet allow you to add custom author names without having to create new user accounts.
// Simply place this snippet in the functions.php file.
// Viewing the post dashboard, navigate to the screen options dropdown (located top right of the screen)
// and enable custom fields.
add_filter( 'the_author', 'guest_author_name' );
add_filter( 'get_the_author_display_name', 'guest_author_name' );