- This topic has 4 replies, 3 voices, and was last updated 1 month, 3 weeks ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
Hello, we use the white version of the site, but for a few subpages the dark mode suits the subpage better.
Is it possible to set a parameter in the url so that such a subpage is displayed directly in dark mode?
Or is there another way to display individual subpages in dark mode?
Thank you and best regards
Tim
Hi Tim,
At first, thank you for choosing our theme and service.
Unfortunately requested changes can’t be applied with the theme options, please try to find a related 3rd party plugin to get the results.
Kind Regards
Ok, what a pity that there is no function for this.
I am now trying to solve this using user-defined fields, but I need to know which CSS file is responsible for the dark mode.
Could you let me know?
This is the code I am trying to work with so far:
function add_dark_mode_css_custom_field() {
if (get_post_meta(get_the_ID(), ‘dark_mode’, true) === ‘true’) {
wp_enqueue_style(‘dark-mode’, get_stylesheet_directory_uri() . ‘/dark-mode.css’);
}
}
add_action(‘wp_enqueue_scripts’, ‘add_dark_mode_css_custom_field’);
Hi Tim,
Regarding the custom coding solutions, I have to redirect this thread to the tech support and they will do their best to assist.
Kind Regards
Hi again,
Applying dark skin to only some pages needs some code modifications in our plugin, if you want to create custom CSS with styles that overrides theme styles on some pages you can do it easily via code snippets as well, or you can create child theme and extend CSS using page CSS classes.
Kind regards,
George