Child Theme CSS when using two WP sites with one DB
-
Hi Everyone,
Thought I’d ask this here to see if anyone has done anything similar.
I am re-developing a site for a client and forgot to check his DB allowance before setting up another WP install. The dev folder was installed into the same DB as the old site as a result of this and I decided I’d clean it up after development has been completed.
But I’m having another issue. Using a child theme of the theme I purchased for my client, I usually enqueue the child theme’s stylesheet as outlined here: https://codex.wordpress.org/Child_Themes
So my code looks like this:
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', PHP_INT_MAX); function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/enhance-style.css', array( 'parent-style' ) ); }However, the issue with the enqueue is that it defaults to http://www.domain.com, instead of http://www.new.domain.com which is where the development site is installed.
Is there a way to modify the script such that it points to the correct URL?
Thanks in advance.
The topic ‘Child Theme CSS when using two WP sites with one DB’ is closed to new replies.