Skip to content

Instantly share code, notes, and snippets.

View cesgarma's full-sized avatar

cesgarma

View GitHub Profile
@cesgarma
cesgarma / footer.html
Last active March 24, 2022 19:11
Easily add contact information to WordPress HTML widgets in the footer.
<div class="soltuin-card soltuin-whatsapp">
<a href="https://api.whatsapp.com/send?phone=524491234567"> +52 (449) 123-4567</a>
</div>
/* Divi cart icon left to burger menu */
#et-top-navigation {
display: flex !important;
flex-direction: row;
justify-content: flex-end;
width: 100%;
}
a.et-cart-info {
text-align: center;
@cesgarma
cesgarma / index
Last active March 1, 2021 23:48
Display horizontal social network icons as a widget on a Divi WordPress site using the HTML widget.
<ul class="et-social-icons">
<li class="et-social-icon et-social-facebook">
<a href="" class="icon">
<span>Facebook</span>
</a>
</li>
<li class="et-social-icon et-social-twitter">
<a href="" class="icon">
<span>Twitter</span>
</a>
@media (max-width: 980px) {
#et-secondary-menu {
display: block !important;
}
}@media (max-width: 767px) {
#et-secondary-menu .et_duplicate_social_icons {
float: left;
}
#top-header .et-cart-info {
float: left;
@cesgarma
cesgarma / code.js
Created February 16, 2021 23:16
Set the Divi Accordion module as closed by default. Also adds a close button when an accordion section is opened. Add the code to your <head> for all website or on the individual page within a CODE module. Also add the CSS to add the Close button.
<script>
jQuery(function($){
$('.et_pb_toggle_title').click(function(){
var $toggle = $(this).closest('.et_pb_toggle');
if (!$toggle.hasClass('et_pb_accordion_toggling')) {
var $accordion = $toggle.closest('.et_pb_accordion');
if ($toggle.hasClass('et_pb_toggle_open')) {
$accordion.addClass('et_pb_accordion_toggling');
$toggle.find('.et_pb_toggle_content').slideToggle(700, function() {
$toggle.removeClass('et_pb_toggle_open').addClass('et_pb_toggle_close');
@cesgarma
cesgarma / styles.css
Created February 3, 2021 22:45
#1. Add Font Awesome To Divi The first step is to make sure you have Font Awesome integrated into your website. Font Awesome is an icon web font, and has a huge selection of free and paid icons that you can use. #2. Add An Icon You Don’t Want First
Facebook
.et-social-facebook a.icon:before {
content: "\xxxx";
font-family: "Font Awesome 5 Brands"!important;
}
Twitter
.et-social-twitter a.icon:before {
content: "\xxxx";
font-family: "Font Awesome 5 Brands"!important;
}
/**
*
* Utility function to print to log file when using Ajax
*
* Log Location: /wp-content/debug.log
*
* Remember to enable Debug Log in the wp-config.php file:
*
* define ('WP_DEBUG_LOG', true);
*
//https://www.tutorialfor.com/questions-92660.htm
Install MailCatcher
Try entering the following command in the terminal.
* Do not enter the leading $. It's like rules for writing code
$sudo gem install mailcatcher
Installation will be completed after a while. Next, start MailCatcher.