What does $scheme in site_url function do?

<?php site_url( $path, $scheme ); ?> Parameters $path: (optional) Path to be appended to the site url. $scheme: (optional) Context for the protocol for the url returned. Setting $scheme will override the default context. Allowed values are ‘http’, ‘https’, ‘login’, ‘login_post’, ‘admin’, or ‘relative’. It simply overrides the default parameters in URL. For example if … Read more

How to get rid of index.php?

This is a classical case. All you need to do is to use Rewrite Rules. With Apache, you can do it in .htaccess: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress More on this in codex.

Changing www prefix in General Settings and Interior Links

This code could help you, just change mysite.com and www.mysite.com and go to phpMyadmin run that Sql code: UPDATE wp_comments SET comment_author_url = REPLACE(comment_author_url, ‘mysite.com’, ‘www.mysite.com’); UPDATE wp_options SET option_value = REPLACE(option_value, ‘mysite.com’, ‘www.mysite.com’); UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, ‘mysite.com’, ‘www.mysite.com’); UPDATE wp_posts SET post_content = REPLACE(post_content, ‘mysite.com’, ‘www.mysite.com’); UPDATE wp_posts SET post_excerpt = … Read more

Change homepage url

i think this can help you: use the below code in your theme’s functions.php function redirect_homepage() { if( ! is_home() && ! is_front_page() ) return; wp_redirect( ‘http://siteurl.com/news’, 301 ); exit; } add_action( ‘template_redirect’, ‘redirect_homepage’ );

Remove HTTP: from the site URL and just keep // in it

To remove http: and https: from all links, use the following script: add_action( ‘plugins_loaded’, ‘wpse_232287_init’ ); function wpse_232287_init() { // Initiate the function ob_start( ‘wpse_232287_remove_http’ ); } function wpse_232287_remove_http( $buffer ) { // Check for a Content-Type header, only apply rewriting to “text/html” or undefined $headers = headers_list(); $content_type = null; foreach ( $headers as … Read more

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