Skip to content

Instantly share code, notes, and snippets.

@cobaltapps
cobaltapps / margin-top-ez-widget-area
Created January 19, 2013 16:33
Add a margin to the top and bottom of ez-widget-areas, giving them a bit of room to breathe.
.ez-widget-area {
margin: 40px 0;
}
@cobaltapps
cobaltapps / dynamik-custom-fonts-hook-box.css
Created September 21, 2022 00:14
Dynamik Custom Fonts Hook Box CSS Code
@font-face {
font-family: 'My Custom Font';
src: url('https://my-site.com/wp-content/uploads/dynamik-gen/fonts/my-custom-webfont.woff2') format('woff2'),
url('https://my-site.com/wp-content/uploads/dynamik-gen/fonts/my-custom-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@cobaltapps
cobaltapps / override-inline-onclick-event
Created July 21, 2022 21:10
How to override an inline onclick event.
// Setting the DOM element's onclick to null removes the inline click handler
$('#example-button')[0].onclick = null;
// Then you can add your own custom click event function
$('#example-button').click(function() { alert('My Custom Click Event') });
@cobaltapps
cobaltapps / genesis-page-builder-page-styles.css
Last active June 9, 2022 07:35
Styles for Genesis Theme pages when using a Page Builder Plugin.
.builder-page .site-inner {
max-width: 100%;
padding: 0;
}
.builder-page .content {
width: 100%;
}
.builder-page .entry {
margin-bottom: 0;
}
@cobaltapps
cobaltapps / Beaver Builder Theme Hooks Map Functions
Last active June 3, 2022 03:17
Paste the following into your Beaver Builder Child Theme's functions.php file to enable an action hooks map on the front-end of your site, visible only to logged in admins.
// Display BB action hooks on front-end of site (visible to logged in admins only)
function bb_theme_hooks_map() {
if ( ! current_user_can( 'administrator' ) )
return;
$hooks = bb_theme_hooks_array();
foreach ( $hooks as $hook => $value ) {
@cobaltapps
cobaltapps / gulp-user-data-setup.sh
Last active May 25, 2022 17:36
User data code used to setup NodeJS environment on cloud servers such as DigitalOcean and Vultr.
#!/bin/sh
## Copy/paste this script code into the "User Data" textarea that appears when selecting
## the "User Data" checkbox upon setting up your new DigitalOcean Droplet.
## Update Ubuntu
apt-get update
## Install NodeJS and NPM
curl -sL https://deb.nodesource.com/setup_16.x | bash -
@cobaltapps
cobaltapps / gulp-first-time-setup.sh
Last active December 13, 2021 15:45
Initial server setup script for a NodeJS, Gulp powered DEV configuration.
#!/bin/sh
## Run this script from a Terminal (or just copy/paste each command and run one at a time) when you first setup your server
## If you already used the gulp-user-data-setup.sh script code in the setup of a new Cloud Server (as per a Cobalt Apps tutorial) then this script does not need to be run
## Update Ubuntu
sudo apt-get update
## Install NodeJS and NPM
curl -sL https://deb.nodesource.com/setup_16.x | bash -
@cobaltapps
cobaltapps / cobalt-scss.json
Created March 18, 2019 20:43
The default Cobalt SASS config file for Child Themes being edited by either Themer Pro or Instant IDE.
{
"Primary Styles" : {
"Import Path": "/scss/",
"Formatter": "Expanded",
"PreCSS File Path": "/scss/style.scss",
"CSS File Path": "/style.css",
"PreCSS Images Path": "/scss/images/",
"CSS Images Path": "/images/",
"Images Sync Type": "update"
}
@cobaltapps
cobaltapps / hamburger-menu-animation-effects-css
Created May 26, 2017 19:21
Hamburger Menu Animation Effects CSS
Reports: 0
Home
Forums
>
Resources
>
How To's
>
How To Add CSS Animation Effects To Your Mobile Hamburger Menu Icons
@cobaltapps
cobaltapps / freelancer-enqueue-custom-google-fonts.php
Last active November 4, 2020 13:27
The following code allows you to enqueue custom Google Fonts through your Child Theme's functions.php file.
add_action( 'wp_enqueue_scripts', 'freelancer_child_enqueue_google_fonts' );
/*
* Enqueue custom google fonts.
*/
function freelancer_child_enqueue_google_fonts() {
/*
* Example of the freelancer_google_fonts_url function
* with multiple Google Fonts and multiple subsets.
* Note that the fonts are required, but subsets are optional