The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
276 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
575 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 ...
2
votes
3answers
1k 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
356 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
29 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
1k 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
1k 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
199 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
523 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
325 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
125 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
451 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
977 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
228 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
186 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
302 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
889 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
239 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
226 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
749 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
383 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
286 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
861 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.