Skip to content

Instantly share code, notes, and snippets.

<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
/*
Theme Name: Divi Child
Theme URI: https://divinotes.com/
Description: Divi Child Theme
Author: Divi Notes
Author URI: https://divinotes.com
Template: Divi
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
ul.et_pb_tabs_controls:after {
display: none;
}
https://divinotes.com/product-page/?quote_product=Premium%20Quality
@robhob
robhob / daytime_check.php
Last active May 2, 2019 02:27
This function was written to work with the free "Content Visibility for Divi Builder" plugin (https://wordpress.org/plugins/content-visibility-for-divi-builder/). Add the following line to the Content Visibility field of the chosen Section or Module: is_daytime();
function is_daytime() {
$time_now = date("H:i a");
$time_now = DateTime::createFromFormat('H:i a', $time_now);
$morning = "7:00 am";
$morning = DateTime::createFromFormat('H:i a', $morning);
$evening = "8:00 pm";
$evening = DateTime::createFromFormat('H:i a', $evening);
if ($time_now >= $morning && date("h:i") <= $evening)
{
return 1;
@robhob
robhob / .htaccess
Created November 26, 2018 11:54 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@robhob
robhob / more-divi-social-icons.php
Last active November 24, 2018 13:45 — forked from SJ-James/more-divi-social-icons.php
Divi social icons extension
<?php // << Remove opener if adding to functions.php
if ( ! function_exists( 'et_load_core_options' ) ) {
function et_load_core_options() {
global $shortname, $themename;
require_once get_template_directory() . esc_attr( "/options_{$shortname}.php" );
$newOptions = [];
foreach ($options as $i => $optionArray) {
$newOptions[] = $optionArray;
if (isset($optionArray['id']) && $optionArray['id'] == 'divi_show_google_icon') {
@robhob
robhob / In your functions file
Created November 24, 2018 13:30 — forked from mrkdevelopment/In your social icons file
Divi social icons extension
/**
* Loads theme settings
*
*/
if ( ! function_exists( 'et_load_core_options' ) ) {
function et_load_core_options() {
global $shortname, $$themename;
require_once get_template_directory() . esc_attr( "/options_{$shortname}.php" );
@robhob
robhob / center-divi-gallery-module.css
Created September 18, 2018 18:25
Center the Divi Gallery Module