debug.log setup for WordPress

// Enable WP_DEBUG mode define( ‘WP_DEBUG’, true ); // Enable Debug logging to the /wp-content/debug.log file define( ‘WP_DEBUG_LOG’, true ); // Disable display of errors and warnings define( ‘WP_DEBUG_DISPLAY’, false ); @ini_set( ‘display_errors’, 0 ); // Use dev versions of core JS and CSS files (only needed if you are modifying these core files) define(…

Tagged ,

Wget offline copy of a website

Wget is a fantasitc tool. You need to create an offline copy of a site. No probem. Wget can help you make such copy easily: wget –mirror –convert-links –adjust-extension –page-requisites –no-parent http://example.com Shorthands: wget -mkEpnp http://example.com Clarification: -m, –mirror shortcut for -N -r -l inf –no-remove-listing -k, –convert-links make links in downloaded HTML or CSS…

Tagged , , ,

WordPress and responsive images

You have many options in the HTML markup to define responsivenes. One would be to use srcset and sizes new markup. You may also use picture markup tag if you need more control. Your WordPress code may look like this: <?php $img_src = wp_get_attachment_image_url( $attachment_id, ‘medium’ ); $img_srcset = wp_get_attachment_image_srcset( $attachment_id, ‘medium’ ); ?> <img…

Tagged