The tag has no wiki summary.

learn more… | top users | synonyms

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; ...
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 ...
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 ...
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 ...
5
votes
1answer
683 views

Multi-page posts do not get indexed by Google due to canonical URLs

I've just noticed that on my paginated posts, only the main page gets indexed in Google. The paginated posts "post-title/2" and "post-title/3" for example, do not get indexed. On closer inspection, ...
4
votes
3answers
513 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 ...
4
votes
1answer
916 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.
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 ...
3
votes
2answers
776 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 ...
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 ...
1
vote
2answers
2k 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 ...
1
vote
1answer
781 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 ...
1
vote
2answers
4k 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
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 ...
1
vote
1answer
139 views

Filter out some plugin action in wp head / wp_footer

I am using a plugin called "syntaxhighlighter". I know not to ask for plugin specific questions but rather how to filter out action added to the wp_head / wp_footer conditionally... This is a ...
1
vote
2answers
511 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 ...
1
vote
2answers
644 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 ...
1
vote
1answer
91 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 ...
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
2answers
389 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 ...
1
vote
0answers
39 views

How to modify default controls in Wordpress theme customizer

I'm trying modify the default control in the wordpress theme customizer specifically the action for the close button. By default clicking it will make you go back to the themes page, but I want it to ...
1
vote
2answers
151 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
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
3answers
753 views

add action wp_head not working

I am trying to add some code to the head (namely a block of tracking script) via a plugin I am making. The plugin has an interface where the user enters some details which are then added to the ...
0
votes
6answers
2k 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
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
1answer
275 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 ...
0
votes
1answer
54 views

How To Make Sure That My Action Hook Executes Last

How can I make sure that my_function action hook on 'wp_head' is executing last? One hack, that I'm using, is to give 999999 (a big number) as the third argument. But maybe some other hook on ...
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', ...
0
votes
2answers
101 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
199 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 ...
0
votes
1answer
660 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 ...
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 ...
0
votes
1answer
129 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
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
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
330 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
28 views

How to find which plugin is outputting Open Graph tags to <head>

After getting an error the Facebook debugger about duplicate og:url tags, I'm trying to find which plugin is outputting the second set of Open Graph tags to my head section. I've tried deactivating ...
0
votes
1answer
1k 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 ...
0
votes
1answer
175 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
971 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
2answers
355 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
220 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
1answer
509 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 = ...
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
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 ...
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') { ...
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" ...
0
votes
0answers
3 views

Insert Google Authorship into Wordpress Header with Action Hook wp_head

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. http://myguitarpal.com/videos/?lesson_id=13 Google ...
0
votes
0answers
10 views

Meta description ellipsis [duplicate]

I have a function that puts a meta description in my theme's <head>. It works well but I have a small issue. It just cuts off words in the description once it reaches the 160 character limit. I ...