wp_head function causes 30px blank space [closed]

Closed. This question is off-topic. It is not currently accepting answers. Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third party plugins and themes are off topic, they are better asked about at their developers’ support routes. Closed 5 … Read more

Trying to inject twitter metadata into using wp_head action in functions.php – get_the_excerpt() returns null

So I followed the “Add Twitter Cards without plugins” this tutorial for how to add twitter metatags into the header using the wp_head method. I have pretty much taken the code as is, and put it in my functions.php. This works great for all the metatags except get_the_excerpt() which seems to just return nothing and … Read more

Change dns-prefetch to preconnect with correct protocol

I have this function in my functions.php file: function dns_prefetch_to_preconnect( $urls, $relation_type ) { if ( ‘dns-prefetch’ === $relation_type ) { $urls = []; } if ( ‘preconnect’ === $relation_type ) { $urls = wp_dependencies_unique_hosts(); } return $urls; } add_filter( ‘wp_resource_hints’, ‘dns_prefetch_to_preconnect’, 0, 2 ); It takes the URLs defined in wp_dependencies_unique_hosts() – which WordPress … Read more

add_action and wp_head not display content in head section

I have a big problem. In a WordPress page I’ve a function that generate og meta tags. I want to “append” that generated meta in the head section. So, I write this code: add_action(‘wp_head’, ‘_set_meta_tag’); function _set_meta_tag() { global $nome; global $descr; global $file; global $path_meta; $output = “”; $output .= ‘<meta property=”og:title” content=”‘.$nome.'” />’; … Read more

How can I make new .css file in child theme override styles in child theme’s style.css

I want to make a separate responsive.css file in my child theme but having trouble making the media queries override the styles in the child theme’s default style.css. I’ve tried putting <link rel=”stylesheet” href=”https://wordpress.stackexchange.com/questions/115637/<?php echo get_stylesheet_directory_uri(); ?>/responsive.css” type=”text/css” media=”screen”/> after the <?php wp_head(); ?> code, which works, but I’ve read that this is not good … Read more