Skip to content

Instantly share code, notes, and snippets.

@Geoplous
Geoplous / divi-blog-module-tags.txt
Last active January 9, 2024 09:09
WordPress Divi show tags in Blog module
/* Create an override in your child theme.
/* Copy of the: Divi/includes/builder/module/Blog.php
/* to (create /module/ folder if does not exist): Divi-child/module/Blog.php
/* Edit the new Blog.php,
/* line3, replace: ET_Builder_Module_Blog with: Geoplous_ET_Builder_Module_Blog
/* last line, repace: new ET_Builder_Module_Blog; with new Geoplous_ET_Builder_Module_Blog;
/* Just before </article> (it will show the tags on the bottom of the post) add the code below:
<?php
@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,
@Garconis
Garconis / divi-viewport-pinch-to-zoom.php
Created September 25, 2017 15:05
Divi | Add pinch and zoom (user scalable) to mobile viewport meta
<?php
// Removes et_add_viewport_meta from the wp_head phase
function remove_divi_actions() {
remove_action( 'wp_head', 'et_add_viewport_meta' );
}
// Call 'remove_divi_actions' during WP initialization
add_action('init','remove_divi_actions');
// add ability to pinch and zoom
@Garconis
Garconis / divi-mobile-submenu-toggles.css
Last active April 3, 2023 10:02
Divi | WordPress Theme | Mobile Menu Collapsible Submenus via Toggles | CSS & jQuery Tweaks in action: https://i.gyazo.com/93557e9ef5d4aad260e22c6d5896de3b.mp4
/* -- HEADER -- */
/* remove pointer event from menu module mobile wrapper */
.et_pb_module.et_pb_menu .et_mobile_nav_menu {
pointer-events: none;
}
/* make menu module hamburger icon and menu links interactive again */
.et_pb_module.et_pb_menu .et_mobile_nav_menu .mobile_menu_bar,
.et_pb_module.et_pb_menu .et_mobile_nav_menu .et_mobile_menu li a {
@lots0logs
lots0logs / child-functions-php-snippet.php
Last active April 19, 2020 08:16
WordPress :: Divi Theme :: Include Tags In Post Meta When Displayed On Frontend
<?php
/* DON'T copy the first line (above) if your functions.php already has it.
* ----------------------------------------------------------------------- */
function et_pb_postinfo_meta( $postinfo, $date_format, $comment_zero, $comment_one, $comment_more ){
$postinfo_meta = '';
if ( in_array( 'author', $postinfo ) )
$postinfo_meta .= ' ' . esc_html__( 'by', 'et_builder' ) . ' <span class="author vcard">' . et_pb_get_the_author_posts_link() . '</span>';
if ( in_array( 'date', $postinfo ) ) {
if ( in_array( 'author', $postinfo ) ) $postinfo_meta .= ' | ';
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
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/