Method by which plugins and themes extend core WordPress functionality.

learn more… | top users | synonyms

1
vote
1answer
90 views

Add Lightbox To WordPress Native Gallery

Is there a way to check if a gallery is linked to an attachment page or to an image file via jQuery or WP filter? I'm trying to add a lightbox to gallery image that is linked to image file. But I ...
1
vote
1answer
39 views

Inserting above the comment template

I want to insert content, just above the comment template.I have tried all the word-press filters and hooks but failed. I want to insert the content above the comment template, I mean above all ...
1
vote
1answer
74 views

Change the footer text on the login page

I am customising the login page and would like to alter the footer text that takes the user back to the website. Ideally and as an example, changing it from the first image, to the second just below: ...
1
vote
1answer
184 views

Which hooks is this? add_action('wp',

I have seen it here http://codex.wordpress.org/Function_Reference/wp_schedule_event code snippet: add_action( 'wp', 'prefix_setup_schedule' ); I couldn't find this hook anywhere in documentation, ...
0
votes
1answer
43 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
152 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
288 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
72 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
107 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
59 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
213 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
166 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
235 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
24 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 ...
0
votes
2answers
146 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
27 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 ...
0
votes
2answers
144 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
81 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
26 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
126 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
1k 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
23 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
85 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 ...
1
vote
2answers
242 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
164 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 ...
1
vote
1answer
82 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
450 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
86 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
160 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
52 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
52 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
119 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
38 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
331 views

“save_post” hook not triggered in WP 3.6.1

I developed a plugin having a custom metabox that is using the "save_post" hook to store data. The plugin is old 18 months and is used by thousands of customers, so I'm pretty sure everything is good. ...
0
votes
1answer
174 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
151 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
71 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
73 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
24 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
0answers
34 views

When login session ended

I'm trying to add a user meta on user login with hooking to wp_login and then wannna delete this option after user logged out or his session expired. Is there any hook on session expiration to ...
0
votes
1answer
57 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
3answers
201 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
46 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
0answers
26 views

Filter does not modify wp_video_extensions but hard coding works?

I have a added a filter to extend the supported video extensions in WP 3.6 as follows: function dce_add_mov($args){ $args[] = 'mov'; return $args; } add_filter('wp_video_extensions', ...
0
votes
1answer
225 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
131 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
248 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
43 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
101 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
37 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 ...