Skip to content

Instantly share code, notes, and snippets.

@xinwangw
xinwangw / add-custom-js-in-wordpress.md
Created June 11, 2021 00:31
Add Custom JS in Wordpress

Add Custom JS in Wordpress

/* Custom script with no dependencies, enqueued in the header */
add_action('wp_enqueue_scripts', 'tutsplus_enqueue_custom_js');
function tutsplus_enqueue_custom_js() {
    wp_enqueue_script('custom', get_stylesheet_directory_uri().'/scripts/custom.js');
@xinwangw
xinwangw / update-divi-contact-form-error-message.md
Last active June 11, 2021 00:33
How to update Divi Contact form error message

How to update Divi Contact form error message

Divi set the contact form error message in the JS variable et_pb_custom. It can be access from window.et_pb_custom when there is Contact form in the page.

The error message can be override by the following code, and can put HTML code in.

$(function () {
  if (window.et_pb_custom) {
 et_pb_custom.fill_message = "Please fill in the following fields:";
@xinwangw
xinwangw / README.md
Created April 28, 2016 05:09 — forked from magnetikonline/README.md
IE 7/8/9/10/11 Virtual machines from Microsoft - Linux w/VirtualBox installation notes.
@xinwangw
xinwangw / frontendDevlopmentBookmarks.md
Created April 8, 2016 09:16 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.