What’s the better way to add an inline script?

wp_add_inline_script() is intended to be used for inline scripts that use or depend on another script that’s been enqueued with wp_enqueue_script(). It ensures that the inline script is placed appropriately relative to the main script and will won’t appear if the main script is unregistered. The example from the announcement was using Typekit: function mytheme_enqueue_typekit() … Read more

Is tag default in WordPress?

Well, it’s not a stupid question at all… wp_title is a template tag and it was used for a long time (since 1.0.0) to put <title> tag in the header. This way plugins were able to modify the title with filters. In WP 4.4 it was about to be deprecated, but that idea was abandoned … Read more

how to make a child theme replace functions in different php files that are loaded throu require_once

The functions.php file in child themes is run before the parent theme’s functions.php. There are a few more details in the codex. IF the parent theme follows development standards, each of their custom functions should work like this: if( !function_exists( ‘a_parent_theme_function’ ) ) { function a_parent_theme_function() { \\ do stuff } } Then, you just … Read more