after_setup_theme always runs

SOLUTION: after_switch_theme does exactly what I intended here. It fires after the theme is switched TO your theme. One of the solutions mentioned below uses switch_theme. This does not have the desired results, since it only happens upon switching away from your theme. Here is an article that I found as reference: http://core.trac.wordpress.org/ticket/7795#comment:29 Here is … Read more

The proper way to include/require PHP files in WordPress

If you check https://codex.wordpress.org/Function_Reference/get_template_directory_uri You will see get_template_directory_uri() returns a uri, not a server path. You should use instead the get_template_directory() function: include get_template_directory() . ‘subdir/filename.php’; For a plugin you can use the plugin_dir_path() function: include plugin_dir_path( __FILE__ ) . ‘subdir/filename.php’;

Override parent theme translation on child theme

I think I found a solution, but before a little Premise load_theme_textdomain() and load_child_theme_textdomain() are basically equal, the only difference is the default path they use: they get the current language (using get_locale()) and add the relative .mo file to the path passed as argument; then they call load_textdomain() passing as argument both the textdomain … Read more

What is theme-compat?

The theme-compat directory is comprised of a set of deprecated (since WordPress 3.0) files that WordPress used to use as fallback template-part files, in case the active Theme failed to include them. In other words, if a Theme used the get_header() template tag, but failed to include a header.php template-part file, WordPress would fall back … Read more

Installation failed: Download failed. No working transports found

The WordPress site was mostly working without a problem except in a dashboard section of the site, where it was having some issues with updating or installing. When I tried to install theme,it gave me error “Installation failed: Download failed. No working transports found”. Fortunately, i fixed the problem with following solution. It turns out, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)