Tagged Questions

Method by which plugins and themes extend core WordPress functionality.

learn more… | top users | synonyms

0
votes
1answer
78 views

Remove iPhone detection on login page

I have a wordpress site with a customized login page, the problem is when I go to that page on my iPhone, it detects it as an iPhone and adds the viewport meta tag, which normally would be great but ...
2
votes
1answer
1k views

Check before publishing, if already exist post with current custom field value

I have a custom post type with only 3 custom fields in it. $post_types = get_post_meta($post->ID,'post_types',true); $post_taxonomies = get_post_meta($post->ID,'post_taxonomies',true); ...
1
vote
2answers
638 views

action lifecycle

I'm looking for a documentation page where wordpress action lifecycle is explained. Does it exist? I can't understand if init is called before admin_head or viceversa (even if the name is ...
2
votes
2answers
656 views

Wordpress Admin Tooltip hooks

I want to know if there is a way to use Wordpress Adminitration Tooltips (de gray and blue ones) that are shown one you update your worpdress (3.x). Showing the new features. Thanks!
23
votes
1answer
5k views

Passing a parameter to filter and action functions

Is a way to pass my own parameters to the function in add_filter or add_action. For example take a look in the following code: function my_content($content, $my_param) { do something... using ...
0
votes
1answer
1k views

NextGEN Gallery: Adding drop-down menu widget to gallery view without modifying plugin code

In NextGEN Gallery, I am able to add a dropdown menu that lets users filter a gallery to only show images that are tagged with a specific ngg_tag, simply by adding this to view/gallery.php in the ...
0
votes
2answers
227 views

How to deactivate my plugin upon deactivation of NextGen

i'm writing this plugin and i need to deactivate it when NextGen is deactivated: <?php /* Plugin Name: Plugin Name Description: Description Version: 1.0 Author: Author Author URI: Author URI */ ...
0
votes
1answer
1k views

Hooking custom PHP output into WP: how to do it, parse_request almost works but not quite

I'm new to wordpress, so chances are I'm missing something pretty basic here. I'm trying to write a plugin which uses custom PHP code to generate output. I managed to get this working on the ...
0
votes
1answer
135 views

Where should I hook into admin?

Where should I hook into the admin backend to check and see if the user is "active" as defined by the Membership Plugin. Or in other words, where can I hook into the WP admin header to check an ...
2
votes
1answer
202 views

Problem using role_has_cap hook

I'm trying to filter a capability check in order to work around the lack of filters to customize the user edit page in the admin area. But I can't seem to add filters to a hook, and I'm sure I'm ...
0
votes
1answer
2k views

add_action hook for publish_post not working

I can't get my function to trigger on post update or save. I've found a couple of other forum posts around with the same problem, but never an answer :( My code is as simple as: function ...
3
votes
3answers
3k views

How to hook wp_list_pages?

How can I hook the wp_list_pages function so that it reads a value of a custom field and displays it instead of displaying the page title?
2
votes
1answer
274 views

Change WordPress RSS link with filter?

In my theme i use add_theme_support( 'automatic-feed-links' ); to enable the rss links. But i want to create an option to use Feedburner for the main rss feed, my problem is that i don't know how i ...
2
votes
1answer
305 views

Post-Registration, post-meta hook?

Is there a hook in WP to access meta data of a user JUST after they have registered and meta data has been added to the database? I was reading to use profile_update, but wouldn't that be invoked ...
0
votes
1answer
92 views

Distinguish between different widgets of the same type

I'm playing a little with wordpress widgets and I trying to do something like this: I created a sidebar and a widget to display a slider with latest posts. The jQuery loader is something like this: ...
4
votes
2answers
549 views

Is there a hook to put stylesheet and/or JS inside iframes (thickbox or tinyMCE) in admin area

I'm working on my admin area theme and I wanted to make some modifications on the way the thickbox and tinyMCE looks. I could make most of the changes through adding custom stylesheets and JS to my ...
0
votes
1answer
253 views

Why does hook priority affects admin menu permission error?

On this answer, there was this final comment For future readers, Roland's issue was a hook priority issue. Changing priority from 10 to 11 fixed it in his case The answer seems already closed, ...
0
votes
1answer
73 views

Change Title Type

I'd like to change the title field of a post in admin panel. I'd like this field was "textarea" instead of being "input type='text'". Would it be possible through any hook in functions.php? Thanks ...
2
votes
2answers
3k 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 ...
0
votes
2answers
690 views

Where exactly does the edit_{taxonomy} hook fire?

I'm at my wits end. I'm beginning a project that may involve using an action hook in WP that is not well-documented: edit_{$taxonomy} I'm trying to determine exactly when this hook runs, so I just ...
1
vote
2answers
2k views

Adding custom text in items titles from wp_nav_menu()

I need to add something after each title of a specific menu called by wp_nav_menu() I tried add_filter('wp_nav_title', 'testing_stuff'); with function testing_stuff() { $item->title = ...
2
votes
2answers
2k views

How can I remove css from a child theme?

I am using the theme twentyten as a parent theme for my child theme. I have other stylesheets I want to use and so I'm trying to figure out how to wp_deregister_style for the style.css sheet that is ...
1
vote
2answers
1k views

How to get post ID in post_updated action hook?

I want to execute a function, myfunction() [hypothetically named], whenever a page is updated in the admin. The function doesn't do anything to the content that is saved—it just runs an unrelated task ...
0
votes
2answers
547 views

modify URL with mod_rewrite or hook

i'm trying to achieve the following: user enters this URL into browser http://mydomain.com/boston/categoryname/postname/ i then want to get the first "folder" and check whether or not it's ...
8
votes
2answers
10k views

WordPress hooks/filters insert before content or after title

trying to insert content before the post content in my functions.php - I know how to use the regular wp hooks, but unsure how to insert into other areas. Tried this, but it kills content on any other ...
2
votes
1answer
217 views

How can I customize the upload error message in Wordpress?

After following the guide for How can I prevent uploading bmp image? to remove bmp (and in my case tiff images) from being uploaded, I tested and it is working, but noticed users are now getting the ...
2
votes
3answers
986 views

Is there a hook for user activation (after they click the email confirm)?

Is there a hook for user activation (after they click the email confirm)? I am creating a plugin to automatically add them to my email software, but I want them to have to confirm their email first.
0
votes
1answer
392 views

Filter dashboard custom post listing by user

Did some research, but I was unable to implement it after all. I have a custom post type accessible only by a new role. I want to filter the post type listing so that each user should see only his ...
1
vote
2answers
2k views

Hook to get image filename when it is uploaded

I want to get the full local filename of an uploaded image so that I can copy it to a new directory and process it with my own image processing scripts. Which hooks/actions should I look into to ...
0
votes
1answer
182 views

Replacing a placeholder term with a session variable value in taxonomy filter

I have in my themes some code which will set a session variable. For the sake of example, it's a geolocation routine which will set to either USA, UK or ROW, resulting in: $_SESSION['region'] = ...
1
vote
2answers
157 views

how to determine how many and what kind of arguments are passed to hooks

I am not able to understand a very logic behind add_action / add_filter Consider following example: function SearchFilter($query) { if ($query->is_search) { $query->set('post_type', ...
2
votes
2answers
487 views

Run javascript code after wp_login hook?

After using the wp_login hook, is it possible to add a snippet of javascript code to the page seen immediately after the login in wordpress? I want to use this top implement a notification system ...
12
votes
5answers
3k views

How to include code only on specific pages?

I'm learning about plugins and shortcodes. I noticed that when I activate my plugin its code gets loaded on all of my pages-- even pages that don't have my shortcode. (I don't mean content vs. admin ...
1
vote
1answer
988 views

Wordpress Delete hook with wp_delete_post function?

I have this action/hook: add_action( 'before_delete_post', 'my_delete_function' ); function my_delete_function($post_id) { global $wpdb; $achievement = get_the_category($post_id); $h = ...
0
votes
2answers
481 views

Modify Notification Message When Profile Updated

I have added new fields on the user profile page. I want to display a message that says: "It's good ... or not" I couldn't find a hook in the WordPress codex. I don't want to use a plugin only my ...
0
votes
1answer
371 views

Modify posts listing at back end

I want to modify posts listing at back end? Say, for a particular user, with role author, O want to list only few posts at posts listing. How can I do this?
0
votes
1answer
265 views

How to add a filter to the get_body_class function?

I see it is possible to use add_filter with the body_class function, but I'm needing to add one to the get_body_class function. How can I add a filter to a function that is not included in the list ...
0
votes
1answer
3k views

Wrap all post images inside a div element

I searched for all kind of solution but i really could find one that did what i was looking for, what i simple want done is wrapping all images inside a div element, old post aswell as new posts. All ...
1
vote
2answers
5k views

How can I edit post data before it is saved?

I have a plugin and I would like to be able to run the post content through some filters before it is saved to the database. From looking at the plugin api, I see that two hooks that look like they ...
1
vote
1answer
126 views

Showing Notifications While Activating Plugin

I want to give errors like this, while activating my plugin. Which hooks should i use ? Can you share simple examples ? In shortly,when user activate my plugin, is a directory's CHMOD isn't 777 , ...
0
votes
1answer
265 views

How can I override one post and make it display content for another post?

I have two pages on my Wordpress site: mysite.com/?p=100 mysite.com/?p=200 I think I should be able to hook into Wordpress' actions somewhere and re-query the post, so that content for ...
4
votes
2answers
725 views

How can I log a user out of Wordpress before the page loads?

I would am using the code below so that on my wordpress site if ?logout is appended to the end of the URL the user will be logged out. This works well - if the user visits a page such as ...
0
votes
1answer
110 views

Change status of page after an event (Looking for best practice advice)

I'm looking for a best practice/ideas for modifying the status/data of a page after an event. Here's an example of what I'm trying to accomplish - This WordPress site would allow users to sponsor ...
0
votes
4answers
527 views

How to fix my old theme so it loads jQuery properly

I have an older theme that is loading jQuery 'manually', and this conflicts with all plugins that are trying to use jQuery. The following lines are included in the theme header: <script ...
2
votes
1answer
2k views

How can I see all the actions attached to an “add_action” hook?

I'm working with the admin bar and trying to debug some of the menus and their priorities. I know several callbacks get bound to actions, such as this one: add_action( 'admin_bar_menu', ...
1
vote
1answer
3k views

Changing “Lost Password Email Link” to custom password reset page

On the Wordpress site I am working on, subscribers will not be allowed to see anything in the backend at all. Because of that I am creating a custom pages for the Wordpress login page that subscribers ...
3
votes
1answer
710 views

Is there a filter/action to add content to WP admin metaboxes?

I want to add an instruction into a custom term meta-box. Is there a hook to add this or is it easiest just to use JavaScript?
1
vote
1answer
726 views

Is it possible to Hook/Filters Attachment Creation?

Is it possible to hook or filter the attachment creation process? More specifically is it possible to hook into the attachment creation so that I may parse the attachment’s filename, populate the ...
2
votes
2answers
3k views

When calling wp_title(), do you have to create some kind of “title.php” file?

... or does wp_title() already handle the various contexts in your blog? This could clarify for me how I can achieve a reusable index.php file without having all the conditional statements inside it ...
3
votes
1answer
372 views

The 'user_has_cap' hook seems to take two page loads to trigger

This question relates to another question I asked recently (http://wordpress.stackexchange.com/questions/29009/how-to-assign-specific-users-the-capability-to-edit-specific-pages-posts-cus/), the ...