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
  • Raspberry Pi
  • Terminal
  • Unity
  • Website Templates
  • WordPress

Tag: wordpress

Block an IP address with .htaccess

May 8, 2023 Leonardo Signorelli

In case you have identified an unusually high number of requests from a particular IP address with nefarious intentions, we…

Continue Reading →

Posted in: Apache, Drupal 8-9, Terminal, WordPress Filed under: .htaccess, Block IP address, Drupal, terminal, wordpress

New Code Snippets terminal style: How I customized the Escapade WP theme

April 27, 2023 Leonardo Signorelli

For my Code Snippets website, I use the Escapade WordPress theme as the starting point, but I jazz it up…

Continue Reading →

Posted in: CSS, JavaScript, jQuery, WordPress Filed under: CSS, javascript, jQuery, theme, wordpress, WP theme, wp theme customization

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

If you find my articles useful and would like to show your appreciation, consider buying me a cup of coffee ☕️. Your support is greatly appreciated and helps me continue creating valuable content. Thank you!

Donate
  • 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
  • Raspberry Pi
  • Terminal
  • Unity
  • Website Templates
  • WordPress
Copyright © 2025 Code Snippets — Escapade WordPress theme by GoDaddy