Uses do_action() Calls 'wp_head' hook.

learn more… | top users | synonyms

-3
votes
0answers
21 views

custom titles using wp-mvc plugin [closed]

I am using wp-mvc plugin Version 1.3.6, and i have multiple controllers for several purpose. I am using Wordpress Version 4.5 which uses wp_head(). I tried using filter wp_title in bootstrap.php of ...
0
votes
0answers
15 views

Importance of order of robots meta tag in head [migrated]

I'm using add_action( 'wp_head', 'my_noindex_follow' ); to call a function that inserts a noindex,follow robots meta tag into the head of my search results page. Does the order in which the robots ...
0
votes
1answer
731 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 ...
0
votes
2answers
366 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
2answers
878 views

Set title of page using custom page template

Most of the related questions are still unanswered or have very little information. I have a custom theme for my website and use WordPress SEO for titles. All the article pages work fine, except for ...
0
votes
1answer
24 views

How to check widget-cpt meta and display its custom css in the head?

When dealing with a widget that is a custom post type, is there a way to detect when that widget is displayed, then check its post meta for any custom css and enqueue it in the head of the site? ...
1
vote
2answers
5k views

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', ...
0
votes
1answer
583 views

Why won't the action hook wp_head accept parameters?

I'm working on a plugin that adds scripting to the head using add_action('wp_head',..); I have to pass a variable to the function to get my desired result. To test this I'm simple "echoing" out ...
1
vote
1answer
129 views

Putting content into header.php without using wp_head

I am building a plugin. I have to output certain stuff in the header.php file of the theme depending on if/else I will write. However I am not at that point yet. I just learned in order to push the ...
3
votes
2answers
3k 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 ...
2
votes
1answer
179 views

Remove specific CSS and JS from the head

I'm trying to remove some specific lines from the WP_HEAD. Now my header looks following way: <link rel='stylesheet' id='bootstrap-css' href='/themes/wp-e/css/bootstrap.css?ver=4.2.2' ...
8
votes
3answers
229 views

Any advantage of using wp_scripts and is_IE when enqueuing scripts

I read on the WP docs, which pointed to this gist that the correct way to enqueue styles for IE is by using the $wp_styles. I'm guessing that this would be true then for scripts as well. Take these ...
1
vote
2answers
359 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
3answers
97 views

How to control initial wp_head() output?

I followed the common advise to use wp_head() in header.php and wp_enqueue_scripts() instead of hard linking css and js files in header.php. However, I realized that wp_head() outputs lots of stuff ...
0
votes
0answers
69 views

How to output wp_enqueue_style() in HTML head instead of footer

I added some actions to wp_enqueue_scripts to load my custom css and js files in the header section by using wp_head(); right before the closing </head> tag. function mytheme_scripts(){ // ...
-2
votes
3answers
2k views

Why does wp_enqueue_script ignore my 'wp_head' hook?

I would like css_head_scripts and js_head_scripts to be appended to wp-head but Wordpress completely ignores it? Am I missing something? function css_head_scripts() { wp_enqueue_style( ...
0
votes
1answer
27 views

Grab ID from post from plugin and use it to create an object

I want to create an object and set ID for this object like $p = new Product(87); I have this code within a plugin and I want to grab the ID of the custom post being showed: function getPostId(){ ...
0
votes
0answers
26 views

How to tell where <title> tag is being pulled from

I'm working on a site, http://vibrantnation.com, and the meta info is jacked. I've looked in .header.php of both the child and parent theme, and it looks OK. I've checked plugins, like Yoasts' SEO ...
1
vote
1answer
85 views

Remove WordPress scripts

I am working on a custom page template in my theme and I want to remove all other styles and scripts which are loaded, like default theme style, jQuery & other scripts. I want to remove all for ...
0
votes
1answer
22 views

custom COOKIE on custom page

i have problem with create function for set cookie dynamically. when i try in custom page i have of course header is set and i tried something like this: in custompage.php: ...
1
vote
3answers
983 views

Indenting (tabbing) WP_head

Right now all the stuff that gets included in wp_head are left justified all the way in the code view. Whereas all my other code that is around the wp_head is indented (tabbed) two times. Is it ...
2
votes
1answer
1k 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 ...
0
votes
0answers
97 views

How to add rel=“next” & rel=“prev” in <head> dynamically?

I need to add link rel in the <head> section of each page if my current page url is http://xxxx.com/yyy/by-size.html/1/ then i need to add following link rel in head section <link rel="next" ...
1
vote
2answers
128 views

action hook wp_head higher priority as all other plugins/hooks

I work a bit with the wordpress API and I want to try to include a <meta>-tag into my head area of my website. This is my code (works everything fine!): class dmd_noindex_options_page{ ...
10
votes
2answers
12k views

How to Link External jQuery/Javascript files with WordPress

So I'm using Starkers to base my next WP theme on and I've run into a small issue, I was including my own version of jQuery in the header.php file but when inspecting my site using Firebug I noticed ...
2
votes
2answers
4k 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
6answers
8k views

Add code into <head> on a per page/post basis

Is there plugin (or an easyish way) to add code to the <head> section on a per page/post basis? I have a multilingual website and I need to implement the rel="alternate" hreflang markup, so ...
0
votes
0answers
39 views

Put dynamic Javascript in header after doing operations

I want to write a plugin that enables a function to be put in my theme in various places. Then I would like to collect the parameters called and generate a Javascript and put it into my site ...
0
votes
4answers
246 views

ACF custom field in <head> [closed]

I've created an image field using Image URL via the ACF plugin. This field appears across my pages. This field enables admin to change the background image for a selected class. Here's the code I ...
0
votes
2answers
259 views

using wp_head in body tag for css style

I am trying to add css code into head tag. the css style is from shortcodes. title text from shortcode and title color / font size.. etc. This is an example. <html> <head> <?php ...
0
votes
4answers
554 views

Function to echo (or display?) wordpress tags in the head section

I can't figure this out but I'm trying to echo the post Tags of the post in the <head> section. This code resides in the <head> section of the site. Basically I want the post tags to ...
0
votes
2answers
104 views

add_action to wp_head is added, but not called

I'm using the CiviCRM plugin for WordPress, and in the plugin's main file, civicrm.php, it calls add_action() to add a function to wp_head() in order to merge CiviCRM's header with my theme's header: ...
3
votes
1answer
319 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
87 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
14 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
1answer
1k views

Add javascript to wp_head with call to plugin options?

I am trying to write a plugin in wordpress and have been doing it in stages, I understand how to add javascript to the wp_head however adding multiple function calls to the plugins options is ...
0
votes
0answers
37 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
71 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
225 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 ...
5
votes
6answers
3k views

How to add stylesheets only to pages with specific shortcode?

I'm running a function on pages where the shortcode [make-me-a-map] is used. It enqueues javascript to the page and makes a map. That part works fine (woot!) but I'm having trouble with adding the ...
0
votes
2answers
148 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"> ...
8
votes
1answer
208 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
34 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 ...
1
vote
1answer
51 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
138 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
187 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 ...
1
vote
0answers
149 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
0answers
16 views
0
votes
1answer
56 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 ...