The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
643 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
136 views

Use Wordpress Built In Jquery

I see that on every page Wordpress is loading in jquery, how do I go about using that jquery as it keeps telling me that it doesn't recognize $ or $noConflict(); - I'm trying to add some jquery under ...
0
votes
1answer
2k views

How do I find the code executed when wp_head() is called?

I am working on editing the header.php file and I am a bit confused. I am editing the header.php file and I see a call in it to wp_head(); I know that it calls a "callback function" with something ...
9
votes
2answers
7k 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 ...
1
vote
2answers
711 views

wp_head() not including styles and javascripts after a template redirect

I am using the template_redirect action to redirect a user to a custom template which has no header, sidebar or footer (the intent is for it to be in an iframe as a dialog box). After I done the ...
0
votes
1answer
2k 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', ...
1
vote
2answers
5k views

How do I edit wp_head and/or functions.php to remove rss-feed which isnt used and dont validate?

When using w3.org's validation tool Unicorn I get the following error/warning: URI: http://energyshop.se/hem/feed/ This feed does not validate. After looking into my source its there crystal clear ...
1
vote
1answer
1k views

wp_head() - list hooked actions with priorities?

I'd like to add something to wp_head() but I'm aiming precise location (like after style.css but before rtl.css and before my other custom script). I'm wondering if it's possible to list everything ...
4
votes
3answers
608 views

How can I reduce the amount of files loaded/included per plugin?

I have a Wordpress site that uses several plugins, namely 8. Most of these plugins include a lot of their own JS and CSS files, some even include so much as 3 separate CSS files. One can imagine that ...
6
votes
7answers
5k views

Why is wp_head() creating a top margin at the top of my theme header?

I am creating a custom theme, and elements behave as they should but when I place the <?php wp_head() ?> tag I get a top margin, at the top of my theme header. When I remove the <?php ...
0
votes
1answer
59 views

output specific location in the header

Is there a way in which I can output some code in the header and choose it's location? some where like wp function add_admin_menu (where you can choose the placement).
3
votes
2answers
4k views

How can I modify what is being output in wp_head, whether by a theme or Wordpress in general?

I've been working on performance of my site using YSLOW, and noticed that Wordpress it outputting things in my document head that I know I don't need. For example, I'm already calling jQuery 1.9 from ...
0
votes
2answers
109 views

Display Something in the Header After All Styles are Loaded

I'd like to include a functionality in a theme that will overwrite styles from previously included CSS files. For this purpose, I need to be able to display a <style> in the header after ALL ...
0
votes
1answer
241 views

Can't find where to modify <html> attrbitutes

I am trying to create a simple function that adds or edits data in the <html>. Basically, before the server response is sent, I want to find where this piece of html is written at the top level ...
10
votes
2answers
706 views

WordPress Code Flow

I was interested in checking out how the WordPress code flow works... When I googled it, ( probably with the wrong keywrods), all I ended up was this; ...
-1
votes
1answer
73 views

new to javascript - using in <head> instead of functions.php, not loading correctly

Live site. I've decided to incorporate javascript in my new theme; this is my first time doing so and have pieced together what I've down with help of blog posts and forums. I have the javascript ...
1
vote
2answers
168 views

CSS from textarea in options page to frontend what to do

I have a textarea for small css enhancements on the plugins page i output them directly to the head. My Question is how to sanitize the CSS i have validation function registered for the options with ...
-1
votes
1answer
283 views

How can a 'scripts' directory be hooked into wp_head();?

So I'm trying to get my head round <?php wp_head(); ?>. I understand that it loads in the stuff needed for plugins etc., but I'm using a theme that seems to be using it to load in scripts for ...
0
votes
1answer
312 views

Would there be anything stopping me from removing both wp_head and wp_footer?

Some plugins rely on either wp_head or wp_footer or both to introduce their own stylesheets and JavaScript. Those scripts take time to load and slow down my website. Therefore, I would like manually ...
1
vote
1answer
95 views

How do I test my localhost WordPress project with VirtualBoxVM?

I'm working on a WordPress project set up with MAMP on localhost. I try testing the site on internet explorer with VirtualBoxVM by browsing to my local ip. My problem is, wp_head() outputs absolute ...
0
votes
1answer
197 views

colorbox not loading in <head>

I can not get colorbox fully loaded. I am trying to add color box to use in my plugin admin. I do not need it for the front end. I can get the css but can not get jquery.colorbox-min.js or the ...
0
votes
2answers
1k views

How to remove unnecessary elements in the HTML document head

Is there a plugin or something that can help me out with deleting unnecessary elements in my code? I am in charge of fixing a WordPress site and have been asked to remove the following elements that ...
0
votes
1answer
2k views

Echo a div to header.php from functions.php

Within the section of header.php I have a div structure <div id="header"> <div id="masthead"> <div id="branding"> ... I want to add a div within "branding" - I can do this ...
0
votes
2answers
451 views

adding meta data using plugin to top of head

It seems if you use the wp_head hook as an action to put your custom metadata into the head tags of your page, it is dependent on where the theme you are using calls the wp_head. In my case, it is at ...
0
votes
1answer
763 views

Using auth_redirect returns cannot modify header information

I'm hooking auth_redirect to wp_head, but it's returning cannot modify header information. Do I have to hook it to a different action? Something that loads before wp_head? I tried hooking it to ...
3
votes
3answers
2k views

How can I remove the site URL from enqueued scripts and styles?

I'm dealing with an SSL issue and I would like to strip the domain from all scripts and styles being output via wp_enqueue_scripts. This would result in all scripts and styles being displayed with a ...
-1
votes
1answer
436 views

Adding a wp_head hook from an included PHP file

I am using a WordPress plugin for including PHP code within posts and pages, and it's working great - however, I need to insert some styles and scripts, and in order to do that, I need to add a hook ...
0
votes
1answer
31 views

Post Attachment missing head (stylesheets/js/what-not)

I am using a modified 2011 theme, I got the single post to look fine but my single attachment is not working. I'm told this will default to the page.php if I do not have an attachment template. So, ...
1
vote
3answers
2k views

How do I force wp_enqueue_scripts to load at the END of <head>?

I am loading scripts via wp_enqueue_scripts in my child theme. The only problem is that my style.css script get loaded BEFORE plugin scripts, yet I need to override the css in the plugins with my ...
1
vote
1answer
3k views

force enqueue script to be first in order of prominence

I have a few scripts which are being enqueued, the problem is that I want to force the order of prominece to which these scripts are loaded. There is one in particular which is loaded from a plugin ...
0
votes
1answer
254 views

Why would wp_head() cause the menus to break?

I've done a few and sometimes ive noticed that when I try to implement some plugins, widgets, etc, they don't work. When I add the wp_head() function right before the closing head tag, Then they ...
0
votes
2answers
660 views

Remove swfobject.js in wp_head()

I have gotten rid of the wlwmanifest_link and jquery, since I load it from a compressed version and at the footer, but I can't find a way to get rid of the swfobject.js. This is the code I used to ...
1
vote
2answers
452 views

Passing a variable via wp_head and then calling it on the page

As my question suggests I'm having difficulty creating a variable in the header, via functions.php and wp_head, and then calling that variable further down the page. For example, in functions.php ...
0
votes
1answer
139 views

Why does WP load so many files in the head of source code? How do I optimize it?

I have noticed that wordpress loads a bunch of files into the head of a site. This looks really sloppy and discloses vital information about the file structure of a website. Depending how many ...
0
votes
1answer
117 views

Data validation for inline javascript

I try to save inline javascript(Google analytics code) in wp-options table. But i can't figure out what validation function i shall use. I have tried esc_js when saving to the database. But i can't ...
0
votes
1answer
575 views

wp_head function outputs after <head>

I have a function in my functions file where i output Google Analytics code. function mytheme_trackingcode(){ $mytheme_option = mytheme_get_global_options(); $tracking_code = ...
2
votes
1answer
1k views

How to use wp_enqueue_style() and wp_enqueue_script() only when needed?

My plugin uses wp_enqueue_style() and wp_enqueue_script() to load resources, but I have kept in mind not to degrade the performance for the user and only load these when the current set of posts ...
0
votes
1answer
248 views

making a plugin that moves other plugins wp_head actions to wp_footer

I am grappling with implimenting jQm on wordpress and have hit the obstacle that most plugins dont work on jQm ajax loaded pages. However, taking the example of the sharethis plugin, I have found ...
0
votes
1answer
200 views

how can i send this to wp_head - escape problem

how can escape this char ----> ; i ask becuse i want to use this to send some javascript to the head using wp_head this is want i want to attach to wp_head: add_action('wp_head', ...
8
votes
8answers
13k views

What does l10n.js do in WordPress 3.1? And how do I remove it?

I just installed WP 3.1 Beta 2 on my test server. I noticed that it ships with a new l10n.js file that gets automatically inserted into the header. I did a bit of digging and it has something to do ...
0
votes
1answer
4k views

How to load a stylesheet into wp_head from a custom widget?

The code below is part of a widget that goes with my theme. I'm trying to include a stylesheet that the widget needs by placing an add_action call to wp_head. However, the function never fires in this ...
0
votes
3answers
356 views

append stylesheet via shortcode

Wondering how I can add a stylesheet to wp_head section via shortcode, since shortcodes are parsed after wp_head, I've hearing about output buffering but I Am not sure. Any idea?
0
votes
1answer
1k views

How to remove a meta description or other <head> contents

I have a plugin that generates a meta description or title as two of its features. However I run into the problem of other SEO plugins possibly being installed, and ending up with two meta ...
1
vote
1answer
269 views

Remove adjacent_posts_rel_link under 3.2?

I'm trying to remove the adjacent_posts_rel_link links under WP3.2, i.e. remove these from wp_head: <link rel='prev' title='blah blah' href='http://...' /> <link rel='next' title='blah blah' ...
0
votes
1answer
246 views

I add some js files from a plugin to a specific location

How Can I add some js files from a plugin to a specific location with add_action I am Using this widget: ...
0
votes
3answers
823 views

removing wordpress generated code from the head section?

Specifically, I'm talking about the following which gets added automatically: 1) <script type='text/javascript' src='http://mysite.com/wp-includes/js/l10n.js?ver=20101110'></script> 2) ...
0
votes
2answers
396 views

Remove_action inside a function

HI there, I want to remove the actions added to wp_head by a plugin but only in certain circumstances. Here is code that doesn't work: if (is_single() && get_post_type() == 'tenant') { ...
0
votes
1answer
298 views

How to use Canonical URL meta tag to avoid duplicate content issues with WP home pages

By default, Wordrpess sites have at least 2 URLs that can be used to reach the home page: www.site.com/ www.site.com/hello-world Both these URLs point to the same page, the default "hello world" ...
4
votes
1answer
1k views

when should an action be added to init and when should it be added to wp_head

How do you know when to add your action to init or wp_head. In particular with regards to scripts and styles, but also any other action.