Skip to content

Instantly share code, notes, and snippets.

@hbaker
hbaker / change-divi-mobile-menu-breakpoint.css
Created January 25, 2018 02:01
Divi Theme - Modify Mobile Menu Breakpoint
/* 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 January 25, 2018 01:58
Divi Theme - Float Menu Left and Some Items Right
/** 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 January 25, 2018 00:50
Divi Theme - Make Divi's Mobile Menu Scrollable
.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 November 29, 2017 08:51
WordPress - How to Prevent Core, Theme, and Plugin File Editing
// PREVENT WORDPRESS FILE EDITING
define('DISALLOW_FILE_EDIT', true);
@hbaker
hbaker / rename-divi-projects-custom-post-type.php
Last active October 12, 2023 15:19
Divi Theme - Rename Divi's 'Projects' Custom Post Type
// 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 November 29, 2017 07:06
Divi Theme - Add Divi Builder to Custom Post Types
// 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