The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
657 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 ...
-1
votes
1answer
409 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
155 views

Background of default template showing instead of the background of custom page template

Plugins were not working for my custom page template, found out that I needed to put WP_head() and WP_footer(), so did that and the plugins started to work. But now the background changed to that of ...
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
2k 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
219 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
576 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
388 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 ...
3
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 ...
0
votes
1answer
128 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
508 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
239 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
191 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', ...
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
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
251 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
236 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: ...
6
votes
7answers
4k 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
3answers
329 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
3answers
5k views

wp_head() remove redundant scripts?

hey guys, quick question. I'm using jquery for my current project (the latest release). A few plugins I'm using are using jquery as well and they are inserted through wp_head(). Since I want my ...
0
votes
3answers
782 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
389 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') { ...
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
293 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" ...
10
votes
2answers
648 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; ...
4
votes
1answer
915 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.
9
votes
2answers
6k 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 ...