Skip to content
Code Snippets
Useful code to copy and paste
  • ALL
  • Acquia
  • Acquia API
  • Acquia Cloud IDE
  • Acquia Cloud Site Factory
  • Bash
  • Bootstrap
  • C#
  • CSS
  • curl
  • Drupal 8-9
  • Drupal Modules
  • Drush
  • HTML
  • JavaScript
  • jQuery
  • Lando
  • MacOS
  • PHP
  • Raspbian
  • Terminal
  • Unity
  • Website Templates
  • WordPress

Tag: wordpress

WordPress: Fix the error “Download Failed. Destination directory for file streaming does not exist or is not writable.”

May 6, 2022 Leonardo Signorelli

I recently changed the domain of this website from codesnippets.astralmemories.com to codesnippets.freewebtools.net, and when I wanted to update one of…

Continue Reading →

Posted in: WordPress Filed under: wordpress

Changing the height and the source attributes of WordPress images using JavaScript

January 14, 2020 Leonardo Signorelli

I wanted to change the resolution of the generated thumbnails images located in my posts section page of my personal…

Continue Reading →

Posted in: JavaScript, WordPress Filed under: javascript, wordpress

Button Styles (HTML + CSS)

March 26, 2019 Leonardo Signorelli

These are the button styles that our team uses at work, I save them here for an easy copy and…

Continue Reading →

Posted in: Drupal 8-9, HTML, WordPress Filed under: CSS, drupal 8, html, wordpress

Insert HTML before element in JavaScript

July 16, 2018 Leonardo Signorelli

With this method (supported by all major browsers, including IE 4), you can take an arbitrary HTML string, and insert…

Continue Reading →

Posted in: Drupal 8-9, HTML, JavaScript, WordPress Filed under: drupal 8, html, javascript, wordpress

Replace the contents of an HTML element (HTML + JavaScript)

June 15, 2018 Leonardo Signorelli

Setting the value of innerHTML lets you easily replace the existing contents of an element with new content. For example,…

Continue Reading →

Posted in: Drupal 8-9, HTML, JavaScript, WordPress Filed under: drupal 8, html, javascript, wordpress

Forcing INPUT text to lowercase

May 16, 2018 Leonardo Signorelli

On every keystroke, a JavaScript event is triggered to convert the value to lowercase. <input type=”text” onkeyup=”this.value = this.value.toLowerCase();”>

Continue Reading →

Posted in: Drupal 8-9, HTML, JavaScript, WordPress Filed under: drupal 8, html, javascript, wordpress

Forcing INPUT text to uppercase

Leonardo Signorelli

On every keystroke, a JavaScript event is triggered to convert the value to uppercase. <input type=”text” onkeyup=”this.value = this.value.toUpperCase();”>

Continue Reading →

Posted in: Drupal 8-9, HTML, JavaScript, WordPress Filed under: drupal 8, html, javascript, wordpress
  • ALL
  • Acquia
  • Acquia API
  • Acquia Cloud IDE
  • Acquia Cloud Site Factory
  • Bash
  • Bootstrap
  • C#
  • CSS
  • curl
  • Drupal 8-9
  • Drupal Modules
  • Drush
  • HTML
  • JavaScript
  • jQuery
  • Lando
  • MacOS
  • PHP
  • Raspbian
  • Terminal
  • Unity
  • Website Templates
  • WordPress
Copyright © 2023 Code Snippets — Escapade WordPress theme by GoDaddy