The tag has no usage guidance.

learn more… | top users | synonyms

3
votes
1answer
153 views

wp_head() gives me some weird CSS

I was trying to enqueue my stylesheets but it didn't work. Turns out I had forgotten to include wp_head() inside my <head> tag. So I did and then my stylesheets where loading fine. The problem ...
0
votes
1answer
21 views

How to style injected code in header section?

Trying to add custom code to header section <head>..</head>of the blog by adding this code to child-theme functions.php // Add scripts to wp_head() function child_theme_head_script() { ...
0
votes
0answers
9 views

Using WP Head to hook into a specific part of the header?

This is my first plugin. I'm trying to add a tagline underneath the logo. I'm using this code in the plugin: add_action('wp_head', 'tagline'); function tagline() { //Close PHP Tags ?> ...
0
votes
0answers
21 views

Where to put wp_head() when using switch_to_blog()

Where should the call to wp_head() be in my case. I'm using switch_to_blog() in order to keep one consistent header with its own widgets and menus across all multisites. If I call wp_head() in ...
0
votes
2answers
42 views

Best use adding user generated JS/CSS to a theme with a plugin

I want to know the best use of adding custom JS/CSS to a theme. I have built a small plugin which has a section to allow users to add CSS/JS to their theme. Now I am trying to figure out is which is ...
0
votes
1answer
46 views

Change title in head on Archive page

I'm having problems with figuring out how I can change the title on my archives pages. I now have a title like this: <title>Jobs Archive - The Company</title> But I would like to have a ...
0
votes
0answers
8 views

Hooking into action that fires in wp_head from widget on front end [duplicate]

I have a custom action hook for which the do_action() is executed in a function that hooks into the wp_head action. I would like to run add_action() for that custom action hook from the front-end ...
0
votes
2answers
55 views

Remove tags from wordpress head

I don't know when or why but this tags are inserted on my wordpress head automatically and they are adding style that disturb my layout: <meta name="generator" content="WordPress 4.2.2"> ...
1
vote
1answer
29 views

How can I add Javascript in the header of all post pages and only post pages

I am using add_action('wp_head', 'function_that_returns_js_string') in functions.php but it is adding the string in the header across the site. How can this be narrowed down to be only included in ...
8
votes
1answer
137 views

How can i get the name parameter defined in get_header?

For example, on my blog pages i use get_header('blog');, but i don't want to create a new header template called header-blog.php, because i just want to make a small adjustments. Is it possible to ...
1
vote
1answer
40 views

How to replace a function using a child theme?

I have the following function where I would like to replace the image nopic.jpg I have updated by deleting some redundant options. if ( ! function_exists( 'TaskerDev_get_first_post_image_fnc' ) ...
3
votes
1answer
67 views

Wp_head and wp_footer vs wp_enqueue_script javascript files?

I'm converting a bootstrap html website into Wordpress. Now, all recommend using wp_enqueue_script() for registering javascript files. i.e. function themeslug_enqueue_script() { ...
0
votes
1answer
102 views

Adding javascript to functions.php causes problems with my template

I want a "Read on" link that moves to another part of the page when clicked. I understand the HTML bit and I have even used some nice scrolling. It works. But when implemented breaks part of my ...
0
votes
0answers
70 views

use add_action('wp_head') in a widget for generating dynamic CSS styles

I have been working on a 'Custom Pop Links' widget for use in a theme which is ready for distribution. User can change the color of a link using a color picker inside widget. Untill now, I used inline ...
0
votes
1answer
104 views

How do I add a logo to my website?

I would like to know how to do add a logo to my website, before the site title. <html <?php language_attributes(); ?>> <head> <meta charset="<?php bloginfo( 'charset' ); ...
0
votes
0answers
16 views

How can I to add css or js to wp_head from shortcodes or widgets? [duplicate]

How can I to add css or js to wp_head generated from shortcodes or widgets?
0
votes
1answer
36 views

How to customize <head></head>

I want to customize <head> tags, add my own structured data snippet, instead of generated by Yoast. And how to gain overall control of <head> tags contents over pages. How this will be ...
0
votes
1answer
132 views

Change meta tags programatically

Is there a way to change the meta tags not in the head but in a template file through code? I would like to change the meta tags <meta property="og:title" content="title" /> <meta ...
0
votes
2answers
240 views

Use wp-load() and wp_head() to render a page's header outside of WordPress

I use wp-load() to load the basic WP environment and then read some info from the DB without any problem. But now i need to render the full header for a page, including the Yoast SEO plugin. After ...
0
votes
1answer
33 views

Where are the contents of WP_Head

I'm building a theme based on underscores. In the header I'm finding some code for a margin-top but I can't seem to find the source in order to get rid of it. I looked in functions hoping it was ...
0
votes
1answer
314 views

Fatal error: Call to undefined function get_post() with ajax

I have an index.php page with about link, which will get about author content from created page (post) inside WordPress dashboard with name about. I'm using Magnific Popup plugin for poups. I have ...
3
votes
1answer
675 views

Two title tags in my header

I'm building a child theme and it currently has a very simple <head> section in header.php: <head> <meta charset="<?php bloginfo( 'charset' ); ?>"> <meta ...
0
votes
0answers
84 views

How to disable/enable specific plugins for a mobile theme?

I would like to use a mobile theme for my website but not load all the plugins being used for the desktop version. Is there a way to achieve this without having to remove wp_head() from the theme and ...
0
votes
1answer
29 views

How to use only scripts from new theme?

I'm a bit new to WordPress so please forgive me if is a duplicate question. I created new theme with simple file structure: functions.php footer.php header.php index.php style.css js/ I'm trying to ...
0
votes
1answer
2k views

Move all the JS files to the bottom|footer, the right way

In order to speedup my site load and prevent scripts from render the page I'm trying to move all the possible scripts (meaning JS files) from head to footer. After read and do some research I made ...
0
votes
2answers
104 views

Add HTML to single post <head> tag

If I have developed a separate HTML page that I wish to include inside my Wordpress site what is the best way of including it? In this case it requires a javascript library or stylesheet that is not ...
7
votes
2answers
153 views

Caching and Versioning for rtl.css

I am using filemtime() to add a version number for different .css and .js files in a custom WordPress theme. I used the accepted answer described here as a guideline; however, I use the ...
0
votes
2answers
229 views

Disable wordpress from including jQuery in the head section

I need to make Wordpress not include jQuery in the <head> section of every page. The reason I need this - is because I am already including jQuery at the very bottom of the document. I tried ...
0
votes
1answer
135 views

Add OG meta tags to wp head

I'm using gravity forms and on thank you page I would like to be able to add some of the fields into to head OG meta tags. So far I have this: After Gravity forms submission we get the needed fields ...
0
votes
1answer
109 views

Set up description meta automatically

How I can setup/override meta description tag values for arbitrary pages of my site? I have a lot of pages, generated dynamically by script. I need to add dynamically generated meta description for ...
1
vote
1answer
280 views

Searching hook to set cookies before <head> and avoid “headers already sent”

I have written a plugin that sets cookies, and need to avoid the "Headers already sent" PHP error by placing the code at the very top before the head section. Themes usually place wp_head just before ...
0
votes
1answer
131 views

Empty lines in header, how to remove them

I'm making a theme from the _underscores theme, and after some development there are some empty lines in the header tag that I dont know where are they coming from. I suppouse that something is ...
0
votes
1answer
366 views

Hook into wp_head(); in a plugin

I am following a tutorial that requires I put this code above wp_head(); <?php $example_position = get_theme_mod( 'logo_placement' ); if( $example_position != '' ) { switch ( ...
-1
votes
1answer
37 views

Head Code for Custom Taxonomy

There is one custom taxonomy (STORE) and i want to add this code to one taxonomy only <link rel="alternate" hreflang="fr" href="http://www.domain.com/fr" /> What code shall i use?
0
votes
1answer
577 views

Set title of page using custom page template

Most of related question are still unanswered or have very little information. I have custom theme animalswecare for my website www.animalswecare.com I use wordpress seo for title etc. All the ...
1
vote
1answer
176 views

Create mobile navigation header with settings integration

I'm a seasoned programmer but a completely inexperienced WordPress developer. I'm trying to figure out how to create a header that only shows for mobile devices, and how to modify properties of that ...
2
votes
2answers
2k views

wp_head() not inserting the default stylesheet style.css

I have a custom theme with just a name in its style.css. I've activated it in admin which shows it just fine. In the index.php just <?php wp_head(); ?> and it doesn't output the line that is ...
0
votes
0answers
64 views

Color Picker - Manipulate CSS

So i've been able to hook everything up to my theme options, the color picker now works and correctly manipulates certain piece of CSS, so that is all working. What i'm asking now is if there is a ...
1
vote
1answer
224 views

Deregister CSS style file from WP footer

When user is logged in WP add in its footer this CSS: <link rel='stylesheet' id='open-sans-css' href='//fonts.googleapis.com/css?family=Open+Sans....' type='text/css' media='all' /> That ...
0
votes
0answers
132 views

Adding Shortcode Values to wp_head

I'm trying to create a shortcode with attributes which then places the values in meta tags for SEO purpose. I know there a some plugins for this use, but I want a simple and reusable/extendable meta ...
0
votes
1answer
176 views

How do I add Facebook OpenGraph meta tags for attachments in the header for a custom theme?

How do I add Facebook OpenGraph tags in the header when the header has already been called, and the values I need to add are obtained in the body? This is a highly customized theme (which I did not ...
0
votes
2answers
63 views

Hide page name in wordpress page title

In my pages title I got for example "home-my title' and 'Books Archieves- my title', I want to drop those prefixes so I have only on page (home) 'My title' and on archive(category) 'Books- my ...
0
votes
1answer
58 views

Manually add admin bar

Does anyone know how to include the admin bar in a page template where wp_head() and wp_footer() are not present? I'm developing a template other scripts and styles are just getting in the way. Rather ...
1
vote
1answer
577 views

How to remove pingback from head?

I know this question has been asked and answered 1000 times. However, I've never truly found a solution that removes pingback link tag from "wp_head". While there are several ways to block ...
1
vote
2answers
1k views

How to add iOS & fav icons to the theme?

I want to add iOs, Android and favourite icons to the website. Generally I udnerstand how they shold be implomented: link files in the head section and you good to go, however there are many lines ...
0
votes
1answer
100 views

How to load plugin before the wordpress jquery?

I'm fixing a wordpress plugin that uses a 1.0.0 version of jquery. The jquery version automatically included in wordpress is 1.11.0. In a test site, the plugin is dependent on the 1.0.0 jquery and ...
0
votes
1answer
92 views

unable to override style block within wp_head()

I am using the wpbootstrap theme based on bones. I noticed that my website had a white band along the top and I haven't been able to workout what was causing it however I have finally worked it out. ...
0
votes
0answers
193 views

wp_footer hook only working on homepage not in other pages

I try to output a javascript code in wp_footer hook but it is not printed in all pages it is working in home page only. I have checked for the presence of wp_footer(); function in footer.php it is ...
0
votes
1answer
28 views

Insert Google authorship into WordPress header

I'm working on a custom plugin that creates courses and lessons within WordPress. Here's the page I'm trying to get Google authorship showing in: → ...
0
votes
1answer
406 views

edit title-tag in wp_head with yoast seo

I want to manipulate the html-title tag. so < title > these not the content of the title-tag! I use child-themes and it's inevitable, because the template have to be easy to update. So I have to ...