The Stack Overflow podcast is back! Listen to an interview with our new CEO.

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1
vote
2answers
382 views

Is possible dequeue/remove style from wp_footer() hook and add on wp_head() hook?

I need unregister this enqueue style of wp_footer() hook and add it to the top of site with hook wp_head(), this is possible? I'm optimizing my theme to validate in W3C, and one of the requirements ...
0
votes
2answers
864 views

Include HTML (Bootstrap Modal Box) with a plugin into my header

I want to include some HTML, spezific a bootstrap modal box. This is my function with the HTML part: public function dmd_fav_modal_box() { $content = '<div class="modal fade" id="...
2
votes
2answers
2k views

How to add inline css/js inside a shortcode

I'm working on creating a shortcode which is meant to change the css and js dynamically for that shortcode based on the situation. Now the problem is that I not getting a clue about how to use ...
0
votes
2answers
455 views

How to get a single hook from wp_head()?

I am working on a custom post type and I don't want it to get all the clutter from wp_head(). However, I do want to show a specific hook, for example the YoastSEO meta tags. How do I call a specific ...
0
votes
1answer
582 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: myfunction($cookiename,$...
1
vote
2answers
2k 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{ ...
0
votes
2answers
1k 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: ...
1
vote
1answer
75 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' ) )...
1
vote
1answer
3k views

Change meta tags programatically

Is there a way to change the meta tags not in the head but in a template file through code? I would like to change the meta tags <meta property="og:title" content="title" /> <meta ...
0
votes
2answers
94 views

Manually add admin bar

Does anyone know how to include the admin bar in a page template where wp_head() and wp_footer() are not present? I'm developing a template other scripts and styles are just getting in the way. Rather ...
0
votes
1answer
30 views

Insert Google authorship into WordPress header

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=...
3
votes
5answers
19k views

Remove meta robots tag from wp_head

I am in need to remove just this line <meta name=robots content="noindex,follow"/> from wp_head but can't find the right hook to use it with remove_action(). <meta name=robots content="...
0
votes
1answer
162 views

Removing action from template class

I'd like to replace an action in a theme with my own version in a child. In this case, the theme hooks into wp_head to add it's own links. My own functions.php resides in the child theme and looks ...
0
votes
1answer
436 views

Proper after_setup_theme and wp_head cleanup

Im trying to clean up code in my theme a little bit, remove some of the code that is not used and basically do things the right way, to decrease load time etc. Currently I have this code: add_action(...
0
votes
1answer
2k 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 'wp_head'...
1
vote
4answers
13k 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
1answer
5k 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 ...
2
votes
2answers
9k 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
143 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
789 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
2k 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
1answer
261 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: http://www.designchemical.com/blog/index.php/wordpress-plugins/wordpress-plugin-jquery-...