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

How to Link External jQuery/Javascript files with WordPress

From the wording of your question, you must be adding scripts by writing <script> tags in your template. Add your own scripts via wp_enqueue_script() in your template’s functions.php, appropriately setting dependences on jQuery, and wp_head() will add the scripts for you. function my_scripts() { wp_enqueue_script( ‘my-sweet-script’, get_bloginfo(‘template_directory’) . ‘/script.js’, array(‘jquery’) ); } add_action(‘template_redirect’, ‘my_scripts’); See … Read more

How to move the sidebar in TwentyFifteen to the right?

I took the following from the rtl.css and applied them via Magic Widget with additional !important keywords to an English site: body:before { right: 0 !important; left: auto !important; } .sidebar { float: right !important; margin-right: auto !important; margin-left: -100% !important; } .site-content { float: right !important; margin-right: 29.4118% !important; margin-left: auto !important; } .site-footer … Read more

Does WordPress work without a theme?

I think there’s a song for that: “Imagine there’s no theme. It’s easy if you try. No hell below us. Above us only sky …” 😉 So in that imaginary dream: you can still fetch the RSS feeds from your site: example.com/feed/ you can still login to your backend: example.com/wp-login.php you can still access the … Read more

how to add version of style.css in wordpress

Version number is a parameter of wp_enqueue_style(). As per the Codex, here are all the parameters that wp_enqueue_style accepts. wp_enqueue_style( $handle, $src, $deps, $ver, $media ); So for example to load a stylesheet with a version number you’d do the following: function wpa_90820() { wp_enqueue_style(‘my-styles’, get_stylesheet_directory_uri() .’/my-styles.css’, array(), ‘1.0’ ); } add_action(‘wp_enqueue_scripts’, ‘wpa_90820’);

How do I turn off self-closing tags for markup in WordPress (for HTML5, or HTML4, for example)?

Line breaks are added by wpautop(), not wptexturize(). wpautop() is also the function that automatically adds paragraph tags. You’re better off fixing the <br />‘s than you are replacing the filter. Since wpautop() runs at priority 10, you can just hook in after that and fix it. add_filter( ‘the_content’, ‘html5_line_breaks’, 25 ); function html5_line_breaks( $content … Read more