get_template_directory_uri cached?

Caching is not your problem here. The home URL and site URL are stored in the wp_options table in your database. You can update them either by visiting the Settings > General page in your WordPress dashboard, or you can edit the siteurl and home option values directly in the database through an SQL query … Read more

Override WordPress theme url

In a comment I pointed you to an existing answer that I figured would solve your problem. You replied thanks for answering. but it is working for bloginfo(‘url’) & not for bloginfo(‘template_url’). Any ideas? The answer I pointed you to is easily adaptable for that: In your wp-config.php file, after (!) require_once ABSPATH . ‘wp-settings.php’; … Read more

Get current url with parameters passed

Add the following custom function in functions.php file of your theme to get the page url without the clean urls function get_page_custom_link() { global $post; $link = ”; if ( ‘page’ == get_option( ‘show_on_front’ ) && $post->ID == get_option( ‘page_on_front’ ) ) $link = home_url(“https://wordpress.stackexchange.com/”); else $link = home_url( ‘?page_id=’ . $post->ID ); return $link; … Read more

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

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