Method by which plugins and themes extend core WordPress functionality.

learn more… | top users | synonyms

0
votes
1answer
84 views

Hook into create_category

I'm trying to in some way hook into when a new category is created. What I would like to do is to see the term and slug that was created and log them/email them. I have tried to hook in to ...
0
votes
1answer
223 views

How to add description over forum list on bbpress root page

I have few forums added for bbpress and when displaing root page I have them listed. Now I want to add some description at the top to provide some intoruction to visitors. Does anyone know how to do ...
2
votes
1answer
420 views

Delete option value from array using update_option()

I have a user profile field which subscribes the user to forum posts by email. This adds the user's email address to an array in wp-options. Naturally I want the user to be able to unsubscribe, in ...
0
votes
1answer
186 views

Admin Hook at the Login Page

I need to write code before user can enter username and password. So, I have code written just after the following line in wp-login.php page: $action = isset($_REQUEST['action']) ? ...
0
votes
1answer
156 views

How can I do customizations on login, registration and password recovery forms?

There are a couple of answers here basically just linking to a plugin - to be fair there are some more specific ones too. I know there are many possibilities to use different hooks for the ...
0
votes
2answers
110 views

How to hook in to the “output buffer” and add html content

I want to be able to hook into the output buffer flow and add some conditional content to my WP pages. What I want to do is test cookies and display a semi-transparent screen with a content box based ...
0
votes
1answer
330 views

WordPress RSS feed - filter RSS content by custom field value

I can have the RSS feed url like: http://www.mydomain.com/?post_type=job_listing&job_cat=value#1&job_type=value#2&geo_country=value#3&feed=rss2 job_cat & job_type are taxonomies ...
0
votes
2answers
525 views

How to hook into user registration process Before user registers

I need to add a field to the user registration form and then validate it before I add a new user to my WordPress I know how to hook into the registration form via add_filter('register_form', ...
6
votes
2answers
316 views

Wordpress and event-driven programming - what is it about?

I want to state very clearly that this does not intend to revive the discussion about functional/procedural programming versus object-oriented programming. There is plenty said about that, on WPSE and ...
0
votes
1answer
26 views

Is there a way to change select-list for new custom taxonomy?

When you add a category in the admin-panel, the adminstrator can select it's parent. Something like: - Category1 -- Subcategory1 to Category1 -- Subcategory2 to Category1 -- Subcategory3 to Category1 ...
-1
votes
2answers
348 views

How to pass hook variable to function?

I have a function that has an add_action inside it that calls the user_register hook. I would like to be able to echo the variable $user_id from the user_register hook and the $_POST array as well. ...
0
votes
1answer
36 views

Retrieve New user's ID

I'm trying to retrieve the user id of a new user as soon as they're created. I tried using the hook "user_register" but there appears to be no id in there...maybe it grabs the data before a userID is ...
1
vote
2answers
236 views

Conditionally call add_action depending on post_type?

When building a plugin, I know that you can hook into a function to run some code like add_action('admin_footer', array($this, 'custom_function')); And within that function, test for post_type like ...
0
votes
1answer
188 views

save_post not working with attachments

I've made a Meta Box for Posts and Pages, and while testing added Attachments too. But, curiously, the hook save_post does not fire. $cpts = apply_filters( 'my_filter', array( 'post', 'page' ) ); // ...
0
votes
0answers
28 views

Trouble adding data to options table

I am trying to create a function that adds an option containing a subscription list to the options table. (This list is eventually referenced by a plug-in.) I am having some problems as there are two ...
2
votes
2answers
226 views

Can user_register output the password?

I'm trying to output the password of a newly created user in plain text using the user_register hook as explained in this answer. However, upon doing a var_dump of $_POST, I don't see any password ...
2
votes
2answers
3k views

Add subtitle to Woocommerce product title

I'm using WooCommerce on a site built with Pagelines Framework. I need to have a subtitle/customisable field appear under the product name anywhere it appears in the site. As it is, WooCommerce ...
0
votes
1answer
25 views

hook for loading page

I wanted to load my custom plugin when the "Jobs" page is loaded. How am I able to do it? This is my code so far. <?php /** * Plugin Name: wp-retrieve-database * Description: retrieves data ...
4
votes
1answer
120 views

Hook when category is added to post

I'm trying to do something when a category is added to post and saved. I thought that using the save_post hook would have registered when a category is added to a post, but it doesn't appear to. When ...
3
votes
3answers
557 views

wp_mail - Remove sitename from email subject

Can some one tell me how to remove site name from email subject. As of now my email subject looks like this [sitename] - Subject goes here I want it to look like this Subject goes here I ...
3
votes
1answer
273 views

Hook into admin post list page

So I want to create a custom admin interface for the post and page lists. I want it to be a split view with a list of posts and some data on the left, and a full editable preview of the post on the ...
2
votes
1answer
144 views

What does (10, 2) mean when used with add_filter

Please tell my what is 10, 2 in below mention code: add_filter('nav_menu_css_class', 'add_active_class', 10, 2 ); function add_active_class($classes, $item) { if($item->menu_item_parent == 0 ...
0
votes
1answer
781 views

is_home() not working in functions.php file

I'm using woo themes and trying to use some woo hooks to hook into the index.php file from my child theme. I'm using the following code: function content_woo_main_before() { if (is_home() || ...
1
vote
1answer
162 views

Determine plugin name from within plugin_action_links filter

Is there any way to determine what plugin the plugin_action_links filter is addressing when it processes the filter? I'm trying to add some actions for each plugin on the /wp-admin/plugins.php page. ...
1
vote
2answers
293 views

Passing values from a widget to a function within a plugin

I have a plugin that is built with many widgets. A widget's bundle. Each widget creates it's own custom CSS code. Instead of having messy source code where I display 15 different sets of inline CSS ...
0
votes
1answer
73 views

How to hook into action/filter call

I'm about to create a very simple logging plugin. Every time an action or filter is fired I need to log it to the file. The idea is that we will be able to see exactly which actions and filters are ...
1
vote
0answers
57 views

Issue understanding and using WordPress filters and actions

I have a custom WordPress plugin that I have developed. The plugin is a widget bundle containing a bunch of custom widgets. The scenerio The plugin allows for custom css styles through creating a ...
0
votes
1answer
150 views

Using admin-ajax prevents regular php form submission

I have a page with a table of posts and groups of checkbox filters in the sidebar. Looks something like this: www.example.com/toylist |___________| |_______________________| | [ ] Red | | ...
0
votes
1answer
46 views

how to change automatic placing of social plugins below content?

I'm wondering if it possible to change the automatic place below the_content() function; this is becuase I`m displaying custom information fields, but activating the social plugins which have not it´s ...
1
vote
1answer
486 views

save_post hook not triggered in WP v3.6.1

I developed a plugin having a custom metabox that is using the save_post hook to store data. The plugin is 18 months old and is used by thousands of customers, so I'm pretty sure everything is good. ...
0
votes
1answer
370 views

'wp' hook supposed to trigger when editing a post?

I'm trying to figure out if this is by design, a bug or a feature I should try to request. I created a plugin and added the following code: function test_wp() { echo '<div style="position: ...
2
votes
1answer
197 views

Is there a hook to process a backbone restful PUT request inside wordpress?

I play around with Backbone.js (Great !) and want to synchronize my model data with the wordpress ajax api (3.6.1) on the server-side. Adapted to this ...
0
votes
2answers
94 views

Print shortcode in custom action hook not where the shortcode is entered

I have added a custom action hook into my theme. I want to be able to enter a shortcode anywhere in the_content() and have the shortcode print were the custom action hook is rather then the point from ...
0
votes
2answers
97 views

Increment Page Order As Pages Are Created

In the Admin Panel, is there a way to hook into the page creation and increment Page Order number of each page or to be equal to the number of pages. Right now the default is 0 and when I make a new ...
0
votes
1answer
29 views

Storing state between hook functions

I have two functions which I'm hooking into a plugin. Both functions are called (at different times) during a single page creation by the server. I want to set a flag in function_a which can be read ...
0
votes
1answer
67 views

Problem in register activation hook and Copying folder

Hy Guys, I am wanting to copy a folder to activate my plugin, I'm trying this but it does not work. function hyperbolic_activate() { $src = 'includes/myTheme/'; $dst = '../themes/'; ...
1
vote
4answers
661 views

Filter specific shortcode output?

Is there a hook in WordPress that I can use to filter the output of a specific shortcode? Something like this: add_filter('shortcode_output', 'my_filter_function', 2); function my_filter_function ( ...
0
votes
1answer
51 views

Change event firing in wordpress

I have to run a function when a post is published. The function checks a custom meta value and works accordingly. I am using couple of hooks for this purpose: new_to_publish draft_to_publish ...
0
votes
1answer
539 views

WooCommer Product Category Loop - How to change the display order of the rating and price?

I want to do a very very simple thing : To re-order the display of the rating and price information on a WooCommerce product category loop. Now in the product category page I got 5 products, all of ...
1
vote
1answer
192 views

Set template based on query in URL

I want to be able to force WordPress to load an page/post based on a query in the URL. www.mywordpresssite.com/posts/myarticle?template=custom This URL should load the myarticle post using template ...
2
votes
2answers
359 views

Custom function for “Submit for Review” hook

So I manage a blog of about 15 contributors and 5 editors. I wanted to implement a system so that each time a contributor hits the 'Submit for Review' button, and email is sent to the editors to ...
0
votes
1answer
53 views

Getting all post/page IDs related to a soon-to-be-deleted tag/cat

When deleting a tag, category or other term I would like to get the IDs of the posts that are related to the term before deletion. Wordpress uses wp_delete_term, which is found in taxonomy.php, to ...
0
votes
1answer
163 views

theme functions (hooks)

This question was already asked in WordPress, but there was no answer for it. Just wanted to try in this forum if anyone knows about it because i have also same question. want to edit my theme ...
0
votes
1answer
55 views

Given a page ID, how to display entire page (header/content/footer/sidebars) from a plugin hook

Given a page ID it it possible to display the page content from within a plugin hook. I would like to know if it is possible to display the entire page given a page ID ...
0
votes
2answers
75 views

Wrapping my head around add_filter

this is a very general question, which I have really researched. Maybe I'm just being stupid, but I can't quite get when I can use a filter. After some messing around earlier, it seems I can take any ...
0
votes
1answer
54 views

What hook to use to redirect based on $post

Trying to add an action to redirect based on if user is not logged in and is accessing certain post types. Problem is, during template_redirect, $post is NULL and other ones the headers seem to have ...
0
votes
1answer
318 views

Insert new user with form submit 'init' hook

I'm posting a form to insert a new user and hooking my function to 'init'. This code is in my mu-plugins folder. The user gets inserted fine, but the page is not loaded after wards. My form action ...
1
vote
2answers
217 views

How to update WordPress core or themes and still have my child theme hooks work

I made a child theme based on the WordPress twentytwelve theme (i.e., the WordPress 'twentytwelve' theme is its parent). Some of the modification were done very simply by overriding style, using my ...
0
votes
1answer
89 views

Find out if request is for custom post type archive before query runs

I am writing a plugin that is modifying the RSS2 feed for a podcast that uses a custom post type. After the query runs (on action hook template_redirect; See this question for why), I'm checking to ...
0
votes
0answers
20 views

How to return a different page than the one requested

Description of the problem I am now developing a plugin whose purpose is to change the contents of the page a user requested depending on different variables (like, for example, user's location). By ...