Tag Info

New answers tagged

0

I don't think there's a built-in safe way to do this, but you could directly modify the $wp_styles global after things are registered but before they're output, or at least use it to fetch the parameters a style was originally registered with. global $wp_styles; if( isset( $wp_styles->registered['a_stylesheet'] ) ){ ...


0

I finally got it after much research. Most sites neglect to mention that what actually "activates" the child theme is the comment in the CSS. So the child theme MUST include the CSS with the information that links it to the parent child. In my case: /* Theme Name: storefront-child Theme URI: http://example.com/ Description: StoreFront Author: ...


0

My previous answer is overly complicated and potentially doesn't respect the parent theme's dependency chain (see note in other answer). Here's another much simpler take that should work much better: function use_parent_theme_stylesheet() { // Use the parent theme's stylesheet return get_template_directory_uri() . '/style.css'; } function ...


1

Your child theme's functions.php file should be an empty file to which you can add code specific to your child theme. It appears you have copied the functions.php file from the parent theme instead. See this note about functions.php in Child Themes: Unlike style.css, the functions.php of a child theme does not override its counterpart from the parent. ...


-1

You can call the parent css as a separate file in your theme header.php Something like <link href="<?php echo get_stylesheet_directory_uri(); ?>/css/css.css" rel="stylesheet"> Depending on various factors it may be better to copy and paste the parent css into your child css file, and thus no need to import it at all. Saves http requests ...


0

CloudFlare was caching my CSS files. I diagnosed this by selectively purging the CSS file from the cache, and then solved the issue by turning on "Development Mode", all via the CloudFlare dashboard.


0

The way you enqueueing your stylesheets are wrong. Someone very ignorant keeps changing my edit in the codex. The way you are doing this loads your child stylesheet twice. I have already done a post on this that you should check out here The correct way is add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { ...


0

First of all, to resolve the javascript conflict I've set up a simple tl_custom.js under my theme js/ folder, with the following code jQuery(document).ready(function($) { // Remove handler set by themes/Divi/js/custom.js at line 2642 $( 'a[href*=#]:not([href=#])' ).off(); }); Then I add the script with the following code in functions.php ...


0

I might be off track here, but would removing the return false; from the javascript you posted help? return false; in a click function is like saying: event.preventDefault(); event.stopPropagation(); I think this is why your other function is not firing as there is no restriction to having multiple handlers bound to the same event on an element. ...


0

From a purely WordPress perspective, the only solution I see would be to copy the script to your child theme and make edits to it to remove the conflict. If the parent theme uses get_template_directory_uri to reference the path to the script, you'll also have to dequeue the original, and enqueue your modified version. If the script is loaded using ...



Top 50 recent answers are included