How to add some lines to the wp-login.php header via functions.php?

wp_head is for adding stuff in the head of the public/non-admin side of a WordPress site. For the standard login page for the admin screens, you can use login_head: add_action( ‘login_head’, function () { echo ‘<meta name=”viewport” content=”width=device-width, user-scalable=no”>’; } );

Undefined get_header function

What you downloaded was not a replacement for WordPress, it was a theme. Themes need to go inside the wp-content/themes folder. Once a theme folder is placed correctly it should appear as an option in the theme menu in WP Admin where you can preview and activate it. In the meantime, you need to reinstall … Read more

Add meta tags to a custom header

HTTP headers are different than the HTML head. The meta tag you’re looking to add (for the Twitter card) is actually a meta tag that gets place in the HTML head. So to achieve exactly what you’re looking to do from a PHP “functions” file, you’d want to hook into wp_head instead. Like this: add_action(‘wp_head’, … Read more

Content-Security-Policy Headers are there and showing the correct settings, but still getting a refused connection

After tons of digging it appears that the way the error message is worded was a bit misleading. Refused to load https://www.service-domain.com/ because it does not appear in the frame-ancestors directive of the Content Security Policy. What isn’t clarified above is that it wasn’t the server/site I was working on that Refused to load from … Read more

Not so common HTML transition to wordpress issue

At the end every html tag, not self self closing tags, can be used how ever you want. Want to build a website using only <span>, go for it. Going by symantic html. A <section> can contain a <header> and <footer>, symantical that is correct. You can have multiple <header> and <footer> tags, they should … Read more

Adding Plugin Assets to Header

I finally done like this: $form_styles_header = [ “1” => “forms/vendor/bootstrap/css/bootstrap.min.css”, “2” => “forms/fonts/font-awesome-4.7.0/css/font-awesome.min.css”, “3” => “forms/vendor/animate/animate.css”, “4” => “forms/vendor/css-hamburgers/hamburgers.min.css”, “5” => “forms/vendor/animsition/css/animsition.min.css”, “6” => “forms/vendor/select2/select2.min.css”, “7” => “forms/vendor/daterangepicker/daterangepicker.css”, “8” => “forms/css/util.css”, “9” => “forms/css/main.css”, “10” => “table/css/table-styles.css” ]; foreach ($form_styles_header as $no=>$form_style) { wp_enqueue_style(‘du_form_style’.$no, $d_utility_url.”/assets/”.$form_style); } where $d_utility_url is the path to my plugin. … Read more

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