Remove Trailing Slash from Category Base and Tag Base

I did a lot of digging and I came up with this code to solve the problem as well as adding “.html” to pages, categories and tags. The permalink setting takes care of posts. function hpct_page_rewrite($rules) { foreach ($rules as $key => $value) { $newrules[str_replace(‘/?’, ‘.html’, $key)] = $value; } return $newrules; } function hpct_page_link($link) … Read more

wp-admin remove part of the url

I’ve searched in the admin templates. It seems the placeholders rely on the functions wp_get_referer() and wp_get_raw_referer() which use $_SERVER[“REQUEST_URI”], $_SERVER[‘HTTP_REFERER’] and a wp custom variable passed in the request : $_REQUEST[‘_wp_http_referer’]. So WordPress builds some URLs (apparently not all) on REQUEST_URI, that is /wp-admin/whatever (in the backend). The logs show that wp-admin/admin-ajax.php comes through … Read more

How to add an image to a custom url?

Upload an image to the Media Library like usual. Go into Settings > Media and untick the box that says: Organise my uploads into month- and year-based folders Then add the following line to your wp-config.php file: define( ‘UPLOADS’, ‘images/’.’files’ );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)