Skip to content

Instantly share code, notes, and snippets.

cobaltapps / dynamik-custom-fonts-hook-box.css
Created September 21, 2022 00:14
Dynamik Custom Fonts Hook Box CSS Code
View dynamik-custom-fonts-hook-box.css
@font-face {
font-family: 'My Custom Font';
src: url('') format('woff2'),
url('') format('woff');
font-weight: normal;
font-style: normal;
cobaltapps / override-inline-onclick-event
Created July 21, 2022 21:10
How to override an inline onclick event.
View override-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 / genesis-xhtml-to-html-five-markup.css
Created October 17, 2019 15:18
A simple list of Genesis framework XHTML to HTML5 markup conversions.
View genesis-xhtml-to-html-five-markup.css
#wrap => .site-container
#header => .site-header
#title-area => .title-area
#title => .site-title
#description => .site-description
#nav => .nav-primary
#subnav => .nav-secondary
#inner => .site-inner
#content-sidebar-wrap => .content-sidebar-wrap
#content => .content
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.
View genesis-page-builder-page-styles.css
.builder-page .site-inner {
max-width: 100%;
padding: 0;
.builder-page .content {
width: 100%;
.builder-page .entry {
margin-bottom: 0;
cobaltapps / dynamik-custom-fonts-example.php
Created May 13, 2019 19:22
Example font-face code for screencast on how to add custom fonts to Dynamik Website Builder.
View dynamik-custom-fonts-example.php
@font-face {
font-family: 'Rubik-Regular';
src: url('<?php echo get_stylesheet_directory_uri(); ?>/fonts/Rubik-Regular.eot?#iefix') format('embedded-opentype'), url('<?php echo get_stylesheet_directory_uri(); ?>/fonts/Rubik-Regular.woff') format('woff'), url('<?php echo get_stylesheet_directory_uri(); ?>/fonts/Rubik-Regular.ttf') format('truetype'), url('<?php echo get_stylesheet_directory_uri(); ?>/fonts/Rubik-Regular.svg#Rubik-Regular') format('svg');
font-weight: normal;
font-style: normal;
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.
View cobalt-scss.json
"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 /
Last active March 18, 2019 15:36
Script used on a theme by theme bases to setup the Node/Gulp environment, after the initial "first-time" setup script has been run.
## Once the "gulp-first-time-setup" script has been run (see you should run THIS version from that point on
## Copy/paste this line into the Console to make this script executable: chmod +x
## Copy/paste this line into the Console to execute this script: ./
## Initialize NPM
npm init --yes
cobaltapps /
Last active December 13, 2021 15:45
Initial server setup script for a NodeJS, Gulp powered DEV configuration.
## 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 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 | bash -
cobaltapps /
Last active May 25, 2022 17:36
User data code used to setup NodeJS environment on cloud servers such as DigitalOcean and Vultr.
## 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 | bash -
cobaltapps / custom_extender_pro_not_labeled.php
Created August 30, 2018 23:38
A custom version of the extender_pro_has_label function that checks if pages/posts have any labels assigned to them.
View custom_extender_pro_not_labeled.php
function custom_extender_pro_not_labeled() {
if ( is_singular() && get_post_meta( get_the_ID(), '_extender_pro_' . extender_pro_sanitize_string( extender_pro_active_theme_name(), true ) . '_labels', true ) == '' )
return true;
return false;