Method by which plugins and themes extend core WordPress functionality.

learn more… | top users | synonyms

-1
votes
1answer
42 views

Access post meta just after publishing

the following code is supposed to store post meta of the recently published post to the variable $temp. But it doesn't, $temp is always empty. This seems to happen because "transition_post_status" ...
0
votes
2answers
26 views

Contact Form 7 - Execute code AFTER mail send

i've figured out how to do something BEFORE sending the mail, but i also need an action to happen AFTER it's been send. I tried wpcf7_after_send_mail but with no success... Any help on the matter ...
0
votes
1answer
18 views

Hook for altering the content of all wp mails

Hi i want to set email template for all mails for my site . I know how to set up mail template and i set mail template for each of my mail by editing the code ie wp_mail( $recipient, $subject, ...
0
votes
0answers
14 views

How to work with hooks and Posts to posts plugin?

I am using Scribu's Posts to posts plugin to create connections between posts. For example I have custom post type Lesson, and to every lesson one (or more) Teacher can be connected. Connection is ...
0
votes
0answers
13 views

Hook upon database insertion?

I have downloaded a plugin that inserts a new row into a table in my database. I want to perform a calculation on this row as soon as it is inserted into the database, in my own plugin. I've seen a ...
1
vote
0answers
17 views

Rewrite rule for page with plugin shortcode

I created a plugin to display a list of real estate properties on a page. The list is embedded into a custom page as a shortcode: [real_estate_list status="1"] The list is loaded from an external ...
-3
votes
0answers
25 views

AWARD USERS POINTS FOR ADS CLICK [on hold]

I got some sponsors in my website which i would like to promote with some traffic in return for their help. I want to offer my users incentives to visit their website and award some points when they ...
0
votes
1answer
19 views

How to remove related post from home page

I am using thesis i am displaying related post using bellow snippet code.My problem is that i dont want load related post on home page.with the css trick we can make it display none but it loads so i ...
0
votes
1answer
26 views

'comment_post' hook doesn't seem to work? [closed]

This is driving me crazy - Does anyone know why this 'comment_post' hook doesn't seem to work!? I've basically written an entire email notification plugin for it and it's failed on the first step. ...
0
votes
0answers
9 views

hook for adding a new column in woocommerce subscriptions

I try to add a new column in Woocommerce subscriptions, I would like to know what hook i will need to display my new column Thank you Nilda
0
votes
1answer
25 views

Which Hook? Hide attachments from specific post types in media library

as the title implies - I would like to suppress attachments of a specific post type(s) from showing up in the "Media Library" Not asking for a code example, but if someone can point me to the right ...
0
votes
1answer
43 views

What hook to add at start of WordPress load

I want to add a hook that is the first thing that runs every and any time someone hits a page, post or other WP piece of content on my site, and before anything else in WordPress executes. Can you ...
0
votes
0answers
8 views

Hooking into action that fires in wp_head from widget on front end [duplicate]

I have a custom action hook for which the do_action() is executed in a function that hooks into the wp_head action. I would like to run add_action() for that custom action hook from the front-end ...
-1
votes
1answer
60 views

Remove word “Category” from WooCommerce product page [closed]

I'm trying to remove the word Category from the product page. As far as I know the code that displays that is woocommerce_template_single_meta located into content-single-product.php file: ...
1
vote
0answers
20 views

wp.media add context

I have wp.media frame on my plugin to upload doc, docx file. I am filtering the uploaded file. If uploaded other than supported file, it will display this error I am filtering it at ...
0
votes
1answer
19 views

Filter Content on all Post Types

I had this idea to introduce a 'post type footer' using Advanced Custom Fields so that my users could set up common, reusable messages or calls to action and have them appear after the content of a ...
0
votes
0answers
13 views

Bulk action hook for admin pages which uses WP_List_Table

I have an admin page which I added using add_submenu_page function which is listing some custom data using WP_List_Table class. I have defined the bulk actions options in get_bulk_actions and it ...
0
votes
2answers
34 views

How to intercept a 404 error

I'd like to intercept 404 errors and do some things before to show the 404 error page. How can intercept the 404 error?
1
vote
1answer
42 views

Execute a function when admin changes the user role

How can I execute a function, when admin changes the user role of a user? I have two user roles: one is agent and the other one is client . My need is that when admin changes the user role of ...
1
vote
1answer
17 views

Are all hooks/functions tied to Kses meant for sanitization?

I'm currently learning WordPress hooks and am delving into core to see what's happening in there. I noticed there are filters in wp-includes/default-filters.php with PHP comments about Kses. I wasn't ...
0
votes
2answers
34 views

hook filter after the_content on a specific page

I've made a function to hook after the_content. This is only working on certain pages/posts. It's working on the default template but not on my custom one's. function insertFootNote($content) { ...
1
vote
2answers
32 views

How to use output buffering in Wordpress hooked functions?

It doesn't seem that output buffering takes into account echo's from within hooked functions. function buffer_start() { ob_start(); } function buffer_end() { ob_end_flush(); } add_action('init', ...
0
votes
0answers
22 views

Add a new dynamic submenu to an existing menu trough a hook

I have created a function which binds to a shortcode, for inserting a language switcher in the form of a dropdown menu. Now I don't want this menu inserted trough shortcode, but instead i want to ...
0
votes
0answers
18 views

How to modify core when there is no hook?

I want to add a custom HTML5 attribute to the <form> element in the comments form. Since the form field itself is generated by comment_form(), and there is no hook to edit within the opening ...
1
vote
1answer
56 views

Why does wp_enqueue_style() in plugin not load stylesheet?

I'm trying to load a custom stylesheet (for the front-end, not admin area) via plugin. As near as I can tell, I'm doing things the way the Codex says is correct, but my CSS doesn't get loaded. This ...
0
votes
1answer
34 views

WooCommerce comments_template Filter Not Firing

I have a template file that is being called via wp_ajax that returns data from a specific WooCommerce product. In the "tabs" section of the template file every tab is working fine: Description - ...
0
votes
1answer
23 views

Modify a plugin's content

I'm using Mooberry Book Manager which has a hook in it's grid mbdb_book_grid_after_link I've created a plug in so that I can show additional content in the grid, it's very basic <?php /* Plugin ...
1
vote
0answers
32 views

wp cron job fires at every second or so, if callback is wrapped with DOING_CRON check it never fires at all

I am a bit lost while dealing with a open source plugin implementing wp cron. You can read about the problem on github https://github.com/nekojira/wp-currencies/issues/6#issuecomment-116735909 - I ...
0
votes
2answers
36 views

Which hook runs first(init,… or ???) [duplicate]

For example,any "naked" code, i.e.: IF ($_POST) then...., runs directly, before any WP action. for example, this runs later (even with point 1): add_action('init','my_function',1); I want to ...
0
votes
1answer
29 views

What is the action or filter for changing permalink in Edit Post/Page?

I know about edit_form_after_title hook but what about changing the permalink. How does WordPress creates permalink because that permalink and the one that get_the_permalink returns doesn't match? ...
-1
votes
1answer
68 views

add_filter to 'woocommerce_before_main_content' [closed]

I added a filter in functions.php and change priority very high and low to 1 but every time the parameter is an empty string""; add_filter( 'woocommerce_before_main_content','wc_start_layout'); ...
0
votes
1answer
19 views

hook that when page is strating to load

I want to create a page loading message based on php when the wp page is starting to load. is there a hook about it? simply like opposite of wp_loaded? wp_loaded is after the page is fully loaded, I ...
6
votes
1answer
56 views

Hook that get's triggered when the author of a post is changed

Is there any hook that gets trigged when the author of a post is modified from the edit post screen? I can list to the update post hook, but then I will not know whether the author of the post was ...
0
votes
1answer
26 views

Post formating on Home page

I've simple question regarding WordPress post looping. I want to achieve something like this on my site: ~ I am running Real estate portal site and I want to display featured property on my home ...
0
votes
0answers
24 views

Trigger jQuery event with WordPress hook

I'm looking to fire a custom jQuery event after a user submits a comment but I can't quite grasp how to do that within the PHP code. I'm using the comment_post hook: add_action('comment_post', ...
0
votes
2answers
46 views

My add_action (wp_footer, 'method') is not calling?

In my themes functions.php file I have put: add_action('wp_footer', 'method'); function method() { echo "this is being called"; die(); } My wordpress footer.php file looks like this: <?php ...
5
votes
1answer
82 views

switch_to_blog(): Load textdomain

I am using the WordPress multisite feature with Multilingual Press Pro to create a multilingual site with linked posts. In a network activated plugin the custom post types are registered. For ...
0
votes
0answers
14 views

Checking login status before wp_get_current_user is initialised

I am building a theme switcher, that needs to block access to not logged in and subscriber users. Problem is that this has to be done in a function that is called at the "setup_theme" phase/hook, and ...
1
vote
1answer
86 views

Issue adding text after short description on product pages Woocommerce [closed]

I am trying to add some text after the short description on woocommerce. I have come up with the following add action but when I use it, it replaces the existing short description text. Is there a ...
0
votes
0answers
12 views

Filter to set a variable once a post is populated?

I'm working on a playlists plugin. The playlists are just custom post types; and they have extra properties I need to populate once a 'playlist' post is loaded. So the idea would be to have a ...
0
votes
1answer
10 views

Conditional for autosave or auto draft?

I am attempting to create a file using fopen() on save_post. I am having trouble finding the right condtionals to prevent the the file from being created from an auto save. I only want to create the ...
0
votes
1answer
18 views

How to know what filter to use and how to use it?

How can I know what filter I can use to change anything and what my function have to return ? For exemple, sometimes I have to add a or a to a post title. It works (WP doesn't sanitize html tag ...
1
vote
1answer
23 views

Plugin options, presets and filters : can you help me improve my workflow?

I'm building a plugin and I have hard time handling options on it. I already did try several ways but I think i'm stuck on a structural problem here. I would like to have your input on all of this ...
1
vote
1answer
39 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' ) ...
2
votes
1answer
116 views

Schedule WordPress Auto-Updates to only run during business hours

We've turned on WordPress Auto-Updates (yey!), but, just in case this does break anything, we'd like to only run Auto-Updates during daylight hours (e.g. 09:00 - 17:30). We have the "on init" WP-Cron ...
0
votes
2answers
55 views

Knowing if a post is sticky in the 'save_post' action. Where do I have to hook?

I'm using this plugin (FantasticElasticSearch) to index content when it's published. So far it was strightforward and an easy task but, now that I tried to index a flag saying if a post is sticky, I'm ...
0
votes
0answers
24 views

Hook on Publishing a Post Doesn't Fire Correctly (or so I think)

Currently, I'm trying to send out a Push Notification to iPhone every time a blog post is published on my WordPress website. I am using a PHP script to send out the push notification (which works with ...
0
votes
1answer
52 views

Modifying date filter on admin page for custom post type to link to custom field

Apologies if a similar question has already been asked, but I can't seem to find the exact functionality I am looking for. Basically I have a custom post type (sermons) which has 'recorded_date' as ...
1
vote
1answer
37 views

Filter for Admin Nav Menus Drop Down

In short, is there a filter for the Admin Panels Nav-Menu Dropdown List? For non-administrators I need to remove access to modifying / selecting a specific menu but still allow access to other ...
0
votes
1answer
37 views

Is it possible to change image urls by hooks?

I have moved my uploads directory to another server. For example, a url that was pointing to: http://example.com/wp-content/uploads/2015/05/image.jpg should point to here in the new situation: ...