0
votes
1answer
67 views

How to get menu location in wp_update_nav_menu hook

I want to get the menu location in the wp_update_nav_menu (during menu save action) add_action('wp_update_nav_menu', function ($id, $data = NULL) { error_log( var_export($data, true) ); ...
2
votes
2answers
60 views

What's the earliest point I can get the queried object ID?

I'm writing a supplement plugin to Wordpress Mobile Pack because I would like to use the default theme on pages that are assigned a certain page template. My plugin will only deal with the mobile ...
2
votes
1answer
127 views

Check php version before theme activation

I've got theme that requires php 5.3+ version. If older - fatal error occurs with it. So what I need to do when user try to activate this theme is to check php version before going into theme code ...
0
votes
2answers
114 views

Why I can't load my JavaScripts using an hook inside my functions.php file?

I am pretty new in WP (I came from Joomla) and I have the following problem: I am carrying this pure HTML theme (that use BootStrap CSS framework) into a WordPress theme. This is the original pure ...
1
vote
1answer
684 views

Problem only while using require_once() within functions.php

I use add_theme_page() within my child theme's functions.php implemented something like this... // other functions located here that create a custom options page in the Dashboard. // THIS IS NOT A ...
0
votes
2answers
158 views

after_setup_theme is called three times

Trying to find an issue with my theme that is not related with this question, I've started the debugger and enabled a breakpoint to the first line of a function hooked to after_setup_theme. Here I've ...
2
votes
2answers
1k views

Issue with get_theme_mod returning a blank value instead of the saved value

I have what seems to be a rather troubling issue with the get_theme_mod function in the latest version of Wordpress. Only on particular servers (of which meet all Wordpress requirements) the function ...
0
votes
1answer
222 views

Removing Submenu from Menu

Thesis appears to automatically add the sub-menus (sub-menu ul) to menu parents if childs exists. I have a specific need to remove this html from a particular menu. The menu name is: second_level ...
-1
votes
1answer
432 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
3answers
1k views

What can I hook into after_setup_theme?

I'm wondering what can I or should I NOT hook to after_setup_theme? I'm wondering because I have been told that I shouldn't hook wp_enqueue_style to it, but I have seen other places using it to hook ...
0
votes
1answer
486 views

How to display message (with switch_theme hook) after deactivating My theme?

I'm able to display a message by activation of my theme with the 'new' after_switch_theme hook this way: function themeActivationFunction($oldname, $oldtheme=false) { $msg = ' <div ...
2
votes
1answer
2k views

How can I remove “Proudly powered by WordPress” from twentyeleven without modifying footer.php?

How can I remove "Proudly powered by WordPress" from twentyeleven without modifying footer.php, and without creating a child theme? I'm looking for a php command, such as add_action, remove_action, ...
2
votes
2answers
2k views

How do I “unhook” / de-register jQuery so that it's not called as part of wp_footer();?

I need to "unhook" jQuery from my wp_footer() ... it's being called automatically and I'm looking for something I can add to functions.php which prevents it from being called a second time in the ...
1
vote
2answers
412 views

Hooking in to replace the Sidebar/Widget areas

The Goal: To replace the sidebar on all sites across my network with content loaded from a plugin, across all themes. I need a way of over-riding the sidebar/main widget area on all sites across my ...
0
votes
2answers
211 views

It's okay if I do not write add_action()

I downloaded various themes on net and I found on functions.php they write something like this Example to remove inline comment style. function demo_remove_recent_comments_style() { add_filter( ...
11
votes
3answers
1k views

get_template_part vs action hooks in themes

It seems to me both of these afford the opportunity for the end user to modify a theme without actually editing the themes files (via child themes). My question is, is one method preferred over the ...
1
vote
3answers
516 views

Why doesn't wp_enqueue_script() work when including a JavaScript file with TEMPLATEPATH?

I am trying to use tips from here to add my JS file. I put the following in the functions.php of atahualpa theme I've got installed function lektor_init() { if (true) { ...