Sitemap error: error on line 2 or 4 (number could vary) at column 6 (could vary): XML declaration allowed only at the start of the document

This page contains the following errors: error on line 4 at column 6: XML declaration allowed only at the start of the document Below is a rendering of the page up to the first error.   https://wordpress.org/support/topic/sitemap-error-error-on-line-2-at-column-6-xml-declaration-allowed-only-at-the/     Plugin SupportMichael Tina  (@mikes41720) 1 year, 9 months ago Hello, This typically happens when a plugin […]

How to make the galleries sort alphabetically for the dropdown in the Add Gallery /Images page

Navigate in Explorer to htdocs\public_html\wp-content\plugins\nextgen-gallery\products\photocrati_nextgen\modules\nextgen_addgallery_page\templates\upload_images.php   Add the following code to the top: <?php if(!function_exists(“my_cmp”)) {     function my_cmp($a, $b) {       if ($a->title == $b->title) {         return 0;       }       return ($a->title < $b->title) ? -1 : 1;     } } usort($galleries, “my_cmp”); ?>

Comprehensive Debugging

//Report all types of errors. define(‘WP_DEBUG’, true); //Don’t show errors to site visitors. define(‘WP_DEBUG_DISPLAY’, false); //Put logs in wp-content. CAUTION: Hacking hazard define(‘WP_DEBUG_LOG’, true);     @ini_set(‘display_errors’,’On’); @ini_set(‘error_reporting’, E_ALL ); @ini_set ( ‘SCRIPT_DEBUG’, true ); @ini_set(‘log_errors’, ‘On’);   @ini_set(‘error_log’, ‘/home/sage/xhub.fun.log’);     // Simple, elegant /////////////////////////////////////////////////// // TODO: Explain “Simple, elegant” // TODO: Define top […]

Ensure CSS or JS is fresh on each save

function my_scripts_and_styles(){ $cache_buster = date(“YmdHi”, filemtime( get_stylesheet_directory() . ‘/style.css’)); wp_enqueue_style( ‘main’, get_stylesheet_directory_uri() . ‘/style.css’, array(), $cache_buster, ‘all’ ); } add_action( ‘wp_enqueue_scripts’, ‘my_scripts_and_styles’, 1);