Skip to content

Instantly share code, notes, and snippets.

View marklchaves's full-sized avatar
🏄‍♂️

mark l chaves marklchaves

🏄‍♂️
View GitHub Profile
@marklchaves
marklchaves / anti-socials.html
Last active July 18, 2020 23:17
Code for my Anti-Socials Footer Using the Avada WordPress Theme (features Academicon add-on by request)
<!-- Academicons - Add to your Header Area -->
<link rel="stylesheet" href="https://cdn.rawgit.com/jpswalsh/academicons/master/css/academicons.min.css">
<!-- Add this CSS to your Additional or Custom CSS Area in WordPress -->
<!-- Note: <style></style> tags only needed if CSS is added directly
to the HTML page. -->
<style>
/* Custom Anti-Social Buttons */
@marklchaves
marklchaves / avada_add_font_awesome_secondary_header_filter.php
Last active September 27, 2020 22:52
Add Font Awesome Icon in Avada Theme's Secondary Header
<?php
/**
* Prototype for adding a Font Awesome icon to the secondary Avada header.
*
* 1) Telephone
* 2) Email
*
* 1) For the telephone, add the HTML/CSS directly into the Theme Options > Header > Phone Number For Contact Info
* E.g. Call Us Today! Call Us Today! <i class="fontawesome-icon fa-mug-hot fas circle-yes" style="border-color:#3e3e3e;background-color:#3e3e3e;font-size:15.84px;line-height:31.68px;height:31.68px;width:31.68px;margin-right:9px;color:#ffffff;"></i> 1.555.555.555
@marklchaves
marklchaves / local-wordpress-avada-gulpfile.js
Last active June 19, 2020 19:27
Gulp File for Reloading Browser on Local by Flywheel WordPress PHP and CSS File Changes
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var reload = browserSync.reload;
gulp.task('serve', function () {
// Standard call for dynamic sites.
browserSync.init({
proxy: "avada.local"
});
@marklchaves
marklchaves / javascript-exercise-changing-html-on-the-fly.css
Last active January 1, 2020 07:28
JavaScript Exercise: Changing HTML on the Fly
/* || General Styling */
body {
background-color: black;
color: white;
font-size: 18px;
margin: 2% 0;
}
h1 {
@marklchaves
marklchaves / two-logos-better-than-one-css-only-hack.css
Last active January 20, 2022 23:26
Two Logos Are Better Than One - CSS only hack and hook option (use one or the other) to add a second logo to the Avada theme header
/** Refactored for mobile-first 21 January 2022 */
/**
* CSS Only Solution for Adding a Second Logo
*
* Limitation: You can't add a link to the logo
*/
.fusion-logo::after {
content: url(https://marklchaves.files.wordpress.com/2021/03/cme-eye-logo-black-52.png) !important;
@marklchaves
marklchaves / avada_add_text_under_logo_filter.php
Last active September 27, 2020 22:54
Use an Avada Hook to Add Text Under the Logo
<?php
/**
* Use an Avada Hook to Add Text Under the Logo
*/
function my_logo_text() {
echo "<h3>Some Text Under the Logo</h3>";
}
add_filter( 'avada_logo_append', 'my_logo_text' );
@marklchaves
marklchaves / avada_logo_anchor_hook.php
Last active September 27, 2020 22:54
Override the main site logo's link using an Avada PHP hook.
<?php
/**
* Override Custom Logo for a Certain Page
*/
function my_logo_link($my_new_link) {
if ( is_page(2) ) {
return $my_new_link = array( 'class' => 'fusion-logo-link', 'href' => "https://caughtmyeye.dev" );
} else {
return array( 'class' => 'fusion-logo-link', 'href' => ( $custom_link = Avada()->settings->get( 'logo_custom_link' ) ) ? esc_url( $custom_link ) : esc_url( home_url( '/' ) ), );
@marklchaves
marklchaves / font-size-previewer-ii-comparison-version.markdown
Last active January 19, 2020 14:55
Font Size Previewer II (Comparison Version)
@marklchaves
marklchaves / avada-hamburger-highlight-bar.css
Last active July 18, 2020 09:52
Fix for the extra menu item highlighting when using standard and hamburger menu at the same time. Tested on ThemeFusion Avada 6.1.2.
/* Disable the highlight bar over the hamburger menu by default. */
#menu-item-1374 > a {
border-top-width: 3px;
border-top-style: none;
}
/** Turn on the hamburger highlight bar when on a page in the hamburger menu.*/
/**
* These two pages are in the hamburger menu. So, turn back on the highlight
@marklchaves
marklchaves / avada-make-read-more-symbol-into-icon.css
Last active March 26, 2024 06:30
How to change the Read More text in Avada ThemeFusion blog post teasers.
/* Make a Coffee Cup be the read more symbol. */
.fusion-read-more::after {
content: '\002615' !important; /* Hot Beverage */
right: -20px !important;
}
/**
* How to add CSS to Wordpress.
* https://medium.com/@marklchaves/adding-custom-css-to-your-wordpress-website-how-to-guide-a50b474af36d
*/