Hot answers tagged

3

The wp-config.php file is not a good place to put the headers but in case that you do not have access to .htaccess or you are in Nginx server that you are not allowed to modify config, you can put this in your theme's functions.php or a plugin: Modifying WP headers via wp_headers filter function additional_headers( $headers ) { if ( ! is_admin() ) { $...


1

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 be in the proper ...


1

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 the vendor's domain, ...


1

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', function(){ echo '<meta name=&...


1

Joey, When you have a child theme you have the ability to take specific templates from the parent theme, copy the file into your child theme and then make edits. The template file in your child theme will override what the one in the parent theme is doing. Using WooCommerce as an example, if we look into your parent theme you'll want to find a file called ...


1

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 WordPress to undo the damage you caused by overwriting ...


Only top voted, non community-wiki answers of a minimum length are eligible