Divi Tips
Divi Tips
Hide or show WordPress menu items on mobile devices
In Appearance/Menus click on the Screen Options tab at the very top right. In the "Show advanced menu properties" area, check the box next to CSS Classes. Use the either "hide-mobile" or "show-mobile" in the menu class field. NOTE: The max-width is...
Add shortcode to display WordPress Sidebars
Add the following PHP code to your child theme functions.php file. [php] // add shortcode for sidebars - use this format [get_sidebar name="Your Sidebar Name"] function sidebar_shortcode($atts,...
Format superscript text in Divi
Add the following CSS code to the Divi theme options area or your child theme style.css file.
Change default Divi mobile menu hamburger icon color
Add the following CSS code to the Divi theme options area or your child theme style.css file. [css] .mobile_menu_bar:before {color: #fff;} /* change mobile menu hamburger icon color */ [/css]
How to make Divi mobile menu appear sooner
You may find it useful to make the mobile menu appear sooner than the default screen width. Add the CSS in the Divi theme options area. Change the max-width to whatever you like. [css] @media only screen and (max-width: 1320px){...
How to add a search box to Divi header in the secondary menu
Add the following to a menu item in the Secondary Menu. Replace the action to use your site URL. [html] <form role="search" method="get" id="searchform"...
How to add a global footer to Divi theme
IMPORTANT! This method is out dated! You should be using the Divi theme builder to make a custom global footer. Ever wonder how to make a global footer layout that will appear on all pages in your Divi theme? You could make a global Divi library...
How to make a Divi slide in menu (or full screen menu) and a default style menu at the same time.
NOTE: This an old method and I'm sure there is an easier way using the new Divi theme builder. How to make a Divi slide in menu (or full screen menu) and a default style menu at the same time. This way the mobile style (hamburger) icon will appear...
How to change Divi Project slug to something else
Are you using the Divi Projects for something other than projects? You may want to change the permalink (or URL) to say something other than "project". You'll need to use a child theme and paste the following into the functions.php file. You can...
Make image open in lightbox in Divi
Say you added an image in the text editor and want it to open in a lightbox popup. In the editor make the image you placed there a link and link it to itself. Then, paste the following class into the HREF tag (not the image tag)....
WooCommerce Tips
Move email form to top of WooCommerce checkout page
Add the following PHP code to your child theme functions.php file. [php] /* Move email form to top of Woocommerce checkout page */ add_filter( 'woocommerce_billing_fields', 'custom_woo_move_checkout_email_field', 10, 1 ); function...
Hide Coupon Code Area on WooCommerce Cart Page
Add the following PHP code to your child theme functions.php file. [php] // hide coupon field on the cart page function disable_coupon_field_on_cart( $enabled ) { if ( is_cart() ) { $enabled = false; } return $enabled; } add_filter(...
Show Product Thumbnail on WooCommerce Checkout Page
Add the following PHP code to your child theme functions.php file. [php] /** * Show product thumbnail on checkout page. * * @see {templates|woocommerce}/checkout/review-order.php */ add_filter( 'woocommerce_cart_item_name',...
How to delay WooCommerce Emails
You may find this helps speed up the checkout process by delaying the WooCommerce order emails from sending immediately at checkout. Add the following PHP code to your child theme functions.php file. [php] // delay woocommerce emails add_filter(...
Add the Add to Cart button to WooCommerce Shop and Category pages
Add the following to your child theme functions.php file. [php] // Add Add to Cart buttons to shop pages add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 20 ); [/php]
eCommerce with WooCommerce and WordPress – What you need to know
Here are some thoughts, ideas and tips that may help you on the way to building your own eCommerce website with WooCommerce and WordPress. What does it cost? I guess it comes down to the level of game you want to play. If you want to do things on...
How to customize WooCommerce messages on cart and checkout pages
Add the following CSS in the Divi theme options area and customize however you like. [css] .woocommerce-error, .woocommerce .woocommerce-error, .woocommerce-info, .woocommerce .woocommerce-info, .woocommerce-message, .woocommerce...
How to change “Create an account” text in WooCommerce / WordPress
If you want to change the text that appears on things like the WooCommerce "create an account". You can use the same code and replace the variable "woocommerce" for other items. Try the simple code below and it may work for you. Add the function...
How to change the word “Sale” on the WooCommerce sale badge
Add the function below to your child theme functions.php file. [php] // change Sale to Save on the sale badge add_filter( 'woocommerce_sale_flash', 'wc_custom_replace_sale_text' ); function wc_custom_replace_sale_text( $html ) { return str_replace(...
How to uncheck Ship to a different address on checkout page
It's hard to believe this actually needs to be done. Add the function below to your child theme functions.php file. [php] // uncheck Ship to a different address? on checkout page add_filter( 'woocommerce_ship_to_different_address_checked',...