New answers tagged

1

Make sure that you're not just calling these functions within functions.php, but calling them at the right time with add_action(). Try the following: // in your Child Theme's functions.php // Use the after_setup_theme hook with a priority of 11 to load after the // parent theme, which will fire on the default priority of 10 add_action( '...


1

It's import to set the priority for your after_setup_theme higher than your parent theme. The default priority is 10. Using the twentysixteen as example, use priority 11 on child themes' 'after_setup_theme' action. Exemple below: function twentysixteen_child_setup() { add_theme_support( 'post-formats', array( 'video', ) ); } add_action( '...


0

You shouldn't need to change anything in the database. If you've set up your child theme correctly, and it appears in the list of installed themes, activating that child theme, should make any updates necessary. The customizations you made back in the day should go in the child functions.php and child style.css. As long as the function names and class names ...


-3

I think something may be misunderstood here, or as another responder considers, maybe cache. The first thing I notice is the odd code within the file snippet you show. Both === style.css === and the function one will or should break the site. Both style and function should be their own files and they surely should not contain such a label. Id suggest ...


2

get_template_directory_uri() will always return the URI of the current parent theme. To get the child theme URI instead, you need to use get_stylesheet_directory_uri(). You can find these in the documentation, along with a list of other useful functions for getting various theme directory locations. If you prefer to use a constant, then TEMPLATEPATH is ...


0

I eventually figured this out, I don't know exactly why, but it seems the issue was due to the original use of init, once i replaced it with 'wp_head' it worked correctly, my final code looked like this function change_default_galleria_header() { remove_action( 'storefront_header', 'storefront_header_cart', 4 ); remove_action( 'storefront_header', '...


1

Looking at the id's in your rendered code, the name of your parent style seems to be 'basic-css'. That would mean you need array('basic-css') as the dependency in your wp_enqueue_style. However, in the code the child style seems to be called 'defaultbasic-css', while you enqueue it as 'child-style'. So it looks like there is some relevant code missing.


1

As suggested in the comments, these kind of modifications would be better served with a custom plugin, as they are not theme dependent. Here's an example: <?php /** * Plugin Name: Remove Footer Text * Description: Remove admin footer text and update footer text through filters. * Version: 0.0.1 * Author: Name * Author URI: http://example....


0

Child theme inherits all the functionality and styling of it's parent theme. If you are using child theme and a theme update is applied your changes won't be lost or overwitten You can quickly create child theme for any theme, just follow the steps given below: Create a folder and name it exactly your theme name; append -child in the name. e.g. creating ...


0

Finally I found the solution in codex.... Interpreting the Error Message: If the error message states: Warning: Cannot modify header information - headers already sent by (output started at /path/blog/wp-config.php:34) in /path/blog/wp-login.php on line 42, then the problem is at line #34 of wp-config.php, not line #42 of wp-login.php. In this ...


1

That isn't how functions.php works in WordPress. The functions.php in your theme root directory is loaded into WordPress environment by default as long as your theme is activated. It's used as a plugin to add features and functionality of your theme to WordPress. You should take a look at theme functions and including css & javascript for more info. ...


2

That edit explains it. Alphabet is poorly written. Its use of php's include rather than WordPress's own include functions like get_header and get_template_part is breaking the parent/child hierarchy. You could probably make a copy of the file header.php and change those includes, as long as the file calling in header.php does it correctly! As long as ...


1

I'm not sure why you are using exit() in yourreactivatejs()` method as this breaks the method before it even loads your script (hopefully this is for debugging purposes). I also do think that in is unnecessary to create a class to this, a simple spaghetti function would do perfectly. Anyways, if you need to use a class, the class's constructor is not ...


2

You also need to include the RTL.css file which is in the theme too: add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' ); function my_theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'rtl-style', get_template_directory_uri() . '/rtl.css' ); } To use the rtl.css from ...


2

What I read is that the parent css was loaded after the child, so the last one wins It depends on the order in which theme developer is loading stylesheets. Normally WordPress loads child theme's functions.php first and then parent theme's functions.php. the parent Emmet theme uses CSS files called differently than Style.css Yes it does. The ...


1

The cookie is stored on the user's computer. The page is generated on the server. Somehow, you must make sure the cookie is transported back to the server when the user clicks on a link to fetch a second page. The instrument for this is javascript. You must send a script with the page that reads the cookie and adds the cookie content as a query_var to any ...


1

For themes installed from official repository WordPress will have much of the process automated, offering update and handling the process. For third party themes it's a manual process (unless they implement similar update functionality themselves). You can upload a theme archive via Appearance > Themes > Add new > Upload theme in WordPress admin. If I ...


0

I suspect glob needs the current working directory to work, so you could try passing the full path of the file to the existing function you have... include_all_php(dirname(__FILE__).'/includes'); Or set the current working directory first: setcwd(dirname(__FILE__).'/'); include_all_php('includes'); Alternatively you could also use scandir: $filepath = ...



Top 50 recent answers are included