Skip to content

Instantly share code, notes, and snippets.

@hbaker
hbaker / change-divi-mobile-menu-breakpoint.css
Created Jan 25, 2018
Divi Theme - Modify Mobile Menu Breakpoint
View change-divi-mobile-menu-breakpoint.css
/* CHANGE MOBILE NAV BREAKPOINT */
@media only screen and ( max-width: 1079px ) { /* Change this number to modify breakpoint width */
#top-menu-nav, #top-menu {display: none;}
#et_top_search {display: none;}
#et_mobile_nav_menu {display: block;}
}
@hbaker
hbaker / divi-float-menu-left.css
Created Jan 25, 2018
Divi Theme - Float Menu Left and Some Items Right
View divi-float-menu-left.css
/** FLOAT MENU LEFT **/
@media only screen and (min-width: 768px) {
#et-top-navigation {
float: left;
padding-left: 317px; /* Adjust to accomodate width of logo */
width: 100%;
}
nav#top-menu-nav, nav#top-menu-nav #top-menu {
width: 100%;
}
@hbaker
hbaker / scrollable-divi-mobile-menu.css
Created Jan 25, 2018
Divi Theme - Make Divi's Mobile Menu Scrollable
View scrollable-divi-mobile-menu.css
.et_mobile_menu {
overflow-y:scroll!important;
max-height:80vh!important;
-overflow-scrolling:touch!important;
-webkit-overflow-scrolling:touch!important;
}
@hbaker
hbaker / wp-prevent-file-editing.php
Created Nov 29, 2017
WordPress - How to Prevent Core, Theme, and Plugin File Editing
View wp-prevent-file-editing.php
// PREVENT WORDPRESS FILE EDITING
define('DISALLOW_FILE_EDIT', true);
@hbaker
hbaker / rename-divi-projects-custom-post-type.php
Last active Dec 4, 2021
Divi Theme - Rename Divi's 'Projects' Custom Post Type
View rename-divi-projects-custom-post-type.php
// RENAME DIVI PROJECTS CUSTOM POST TYPE
function ze_rename_projects_cpt() {
register_post_type( 'project',
array(
'labels' => array(
'name' => __( 'Specials', 'divi' ), // CHANGE SPECIALS TO WHATEVER YOU WANT
'singular_name' => __( 'Special', 'divi' ), // CHANGE SPECIAL TO WHATEVER YOU WANT
),
'has_archive' => true,
'hierarchical' => true,
@hbaker
hbaker / add-divi-builder-to-custom-post-types.php
Last active Nov 29, 2017
Divi Theme - Add Divi Builder to Custom Post Types
View add-divi-builder-to-custom-post-types.php
// ADD DIVI BUILDER TO CUSTOM POST TYPES
function ze_builder_cpt( $post_types ) {
$post_types[] = 'your_custom_post_type_slug';
return $post_types;
}
add_filter( 'et_builder_post_types', 'ze_builder_cpt' );
// END ADD DIVI BUILDER TO CUSTOM POST TYPES