get_template_directory_uri() generates wrong path

Question

I’ve uploaded a wordpress site but it’s missing javascript and css. The links on the head still have the local path (src='https://localhost...') and not the new ones. So I guess it has to do with get_template_direcory_uri() that I use in fucntions.php to apply my javascript/jquery,bootstrap,css etc.

How yo fix that?

I’ve tried adding to config.php:

define( 'WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] );
define( 'WP_HOME',    'http://' . $_SERVER['HTTP_HOST'] );

and

define( 'WP_HOME', 'https://...' );
define( 'WP_SITEURL', 'https://...' );

but they didn’t help…

--------------------------------------------------

>>> Share a link to this question, just copy and paste the code bellow on your web page <<<

<a href="https://www.wptricks.com/question/get_template_directory_uri-generates-wrong-path/">

get_template_directory_uri() generates wrong path</a>
0
, , Emmanuel Richman 10 months 0 Answers 47 views 0

Leave an answer