Skip to content

Instantly share code, notes, and snippets.

<?php
remove_action( 'after_setup_theme', 'et_setup_theme' );
function et_setup_theme_custom() {
global $themename, $shortname, $et_store_options_in_one_row, $default_colorscheme;
$themename = 'Divi';
$shortname = 'divi';
$et_store_options_in_one_row = true;
$default_colorscheme = "Default";
@kary4
kary4 / functions.php
Created January 6, 2014 20:57
Flexible child theme
function et_create_portfolio_taxonomies(){
$labels = array(
'name' => _x( 'Categories', 'taxonomy general name', 'Flexible' ),
'singular_name' => _x( 'Category', 'taxonomy singular name', 'Flexible' ),
'search_items' => __( 'Search Categories', 'Flexible' ),
'all_items' => __( 'All Categories', 'Flexible' ),
'parent_item' => __( 'Parent Category', 'Flexible' ),
'parent_item_colon' => __( 'Parent Category:', 'Flexible' ),
'edit_item' => __( 'Edit Category', 'Flexible' ),
'update_item' => __( 'Update Category', 'Flexible' ),
<script>
jQuery( document ).ready(function() {
jQuery( document ).ready(function() {
jQuery('ul#menu-dashboard-my-account a[href="https://missionlean.com/my-account/customer-logout/"]').click(function(){
return confirm('Are you sure?');
});
<script>
jQuery( document ).ready(function() {
jQuery('<div class="et_pb_text et_pb_module et_pb_bg_layout_light et_pb_text_align_left et_pb_text_0"><div class="et_pb_text_inner"><form role="search" method="get" class="et-search-form" action="https://www.onlinerockershub.com/"> <input type="search" class="et-search-field" placeholder="Search …" value="" name="s" title="Search for:"> <button type="submit" id="searchsubmit_header">Search …</button><br></form></div></div>').appendTo('.search #left-area')
});
</script>
<script>
jQuery( document ).ready(function() {
jQuery('.et_pb_portfolio_item').each(function(){
let thisLightboxEvent = jQuery('.et_pb_lightbox_image',this);
jQuery('.meta a',this).click(function(){jQuery(thisLightboxEvent).trigger('click'); return false;});
});
});
jQuery('.search .custom-search').prependTo('#left-area');
<script>
jQuery( document ).ready(function() {
jQuery('.et_social_inline_bottom').prependTo('#main-footer');
});
</script>
<script>
jQuery( document ).ready(function() {
jQuery('.single-post .post-wrap-review').insertBefore('.wp_rp_wrap.wp_rp_pinterest');
});
</script>
<script>
jQuery( document ).ready(function() {
jQuery('<img src="#YOUR-LOGO-IMAGE">').prependTo('#mobile_menu_slide');
});
</script>
<script>
jQuery( document ).ready(function() {
jQuery('video').off('play').on('play', function() {
var dd = this.id
jQuery('video').each(function( index ) {
if(dd != this.id){
this.pause();
this.currentTime = 0;