Adding Custom Admin CSS Styles and JavaScript to the WordPress Dashboard

Customizing the WordPress admin can be very useful. A few reasons come to mind: It’s straightforward to customize WordPress themes using CSS and JavaScript. If you need to adjust things on the admin side, here’s a reliable way to include custom scripts and styles from your theme in the WP Dashboard, in a way that… Continue reading Adding Custom Admin CSS Styles and JavaScript to the WordPress Dashboard

Published
Categorized as Snippets

Enqueuing and Loading Custom CSS and JavaScript for Your WordPress Theme: Here’s One Way

Need to load custom CSS and or JavaScript for your custom WordPress theme? There are plenty of ways to do that; here’s mine. Header In your theme’s header.php file, make sure to include the wp_head() function just before the closing </head> tag. For example: Action Hook The hook to use for enqueuing both scripts and… Continue reading Enqueuing and Loading Custom CSS and JavaScript for Your WordPress Theme: Here’s One Way

Published
Categorized as Snippets

How to prevent Nginx from redirecting to the wrong site when there’s a secure certificate error

https://serverfault.com/a/846214 When multiple sites share the same server and there is no default site set in the server config, Nginx will redirect to the first site in the config, if there’s a secure certificate error. Here’s how to fix that, based on the linked answer above. 1 – Create a default zone As nginx is… Continue reading How to prevent Nginx from redirecting to the wrong site when there’s a secure certificate error

Credit Card Numbers for Testing Ecommerce Checkout

Card Type Number American Express 3700 000000 00002  Discover 6011 0000 0000 0012 MasterCard 5424 0000 0000 0015 Visa 4007 0000 0002 7– or –4012 8888 1888 8 Expiration date: use any date after today. CVV: use any three digit combination (four digits for American Express). Note: the Visa card number is a different length… Continue reading Credit Card Numbers for Testing Ecommerce Checkout