Method by which plugins and themes extend core WordPress functionality.

learn more… | top users | synonyms

0
votes
1answer
9 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
10 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
23 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: ...
1
vote
1answer
24 views

Hook for when a page template is changed

I know that you can remove the editor section of the page editor page ( :/) depending on the template chosen using add_action( 'load-page.php', 'hide_editor_function' ); (with proper functionality of ...
0
votes
1answer
18 views

Show excerpt if no title in admin view

Usually my posts do not have a title, so in the admin view it always says "(no title)" wherever the title would be shown. So I am wondering how I could hook into that view function. I would like to ...
-1
votes
1answer
21 views

how to insert content into wp_head after loop_end

I'm trying to access the info on a post, so I can get the post title and post content so that I can generate the respective OG tags to put in the header. Problem is that the info is only avaiable ...
0
votes
1answer
16 views

WP Dashboard -> Posts-> Filter by Category -> Form Method Change : Which Hook

We have a contemporary 4.2.2 WP install running with a handful of various plugins. We have been facing an issue where when a provisioned user is in the "POSTS" dashboard view, the ability to filter ...
0
votes
1answer
53 views
+50

Edit admin post page

I have to customize the admin page where you edit the other pages "wp-admin/post.php". I have to add a lot of things, and delete others, change colors and add a custom menu to the top. I don't know ...
0
votes
2answers
19 views

How can I set a dynamic value for post_updated_messages based on return value of post_updated?

I'm familiar with how to set custom messages for post updates using the post_updated_messages action hook. This question is slightly different. I have a function/action hook on post_updated: ...
0
votes
0answers
20 views

Geting only alert Output from JS file but not run functionality with avilable hook wp_footer and any other

Working Code Status: I was testing my js files, what these files were adding and running correctly or not. So I write a alert code in my-custom.js with my theme functionality, and now I hook my ...
1
vote
1answer
25 views

do_action() hook into load-(page)

I have created an admin theme settings page where I save all my settings in wp_options. Now I want to expand this settings page by plugins which can be activated and deactivated depending on which ...
0
votes
0answers
10 views

Adding Banner below nav

I'm using GeneratePress and want to add a banner image below .main-navigation what action/hook do i have to use to do this? I've tried looking in functions but i cant see anything for the top and ...
0
votes
1answer
21 views

Wordpress wp_loaded action hook

I am using Shortcode exec php plugin and putting PHP code in a post via Wordpress Posts panel. add_action( 'wp_loaded', 'echoFunction'); function echoFunction(){ echo "someText"; } Why doesn't ...
0
votes
1answer
13 views

after login that will redirect user role into a page

I am trying to create a hook that when a user login, it check the user role.. if the user role is jsa_contributor then it redirect into specific page. but it seems my code didn't work. This is the ...
0
votes
1answer
17 views

Get post or page id early

Is there a good solution to get the queried object id really early ... and i mean really early? I got a hook on after_setup_theme where i need to get the post or page id. ...
0
votes
0answers
23 views

Hook before posting via JSON REST API

I have been testing out the JSON REST API the past few days with some pretty good results however I have run into a bit of a barrier when making a post. I need to hook into the post call before the ...
0
votes
1answer
25 views

Hook after meta created

I'm having troubles trying to do a hook when post published. I think that the problem is that my WP-Metaboxer plugin creates the meta after publishing post, and I cannot capture the value. Here is an ...
2
votes
1answer
86 views

How to add rewrite rules and pagination to retrieve attachments files?

I'm trying to list attachments based on different taxonomies. Right now it only work for the basic url (no pagination added). For example ...
4
votes
1answer
97 views

is it possible to get the hook name in add_action?

given this: <?php add_action( $hook, $function_to_add, $priority, $accepted_args ); ?> Is there a way to get $hook value inside the function $function_to_add?
0
votes
0answers
11 views

In Wordpress upgrade hooks, detect what plugin or theme is being upgraded?

I'm writing a plugin that detects when any plugin or theme is installed or being upgraded, and takes appropriate action. I've figured out that I should use the filter hook upgrader_pre_install to ...
0
votes
0answers
17 views

Replace upload system/Override wp_handle_upload

I am going to be running a WP site on Heroku, and none of the current solutions for the media library fit my needs. There is a system for Amazon S3 (not using because paid), and a mapping system for ...
0
votes
0answers
22 views

When to hook into edit profile action?

I have the following function which combines the values of a few user profile fields and saves them as a new user_meta called COMBINED_WORKSHOPS. The function works, but I don't know when/where to ...
0
votes
2answers
122 views

Create a post builder skin in a plugin

Currently I'm working on a plugin that will display a grid based on post type with many settings to customize it. One of the settings will be to choose between different skins available to display ...
0
votes
0answers
14 views

Add class to link surrounding avatar

I need to adjust styling of the -tag surrounding each avatar on my page. It's easy to add a class to the avatar img itself with this code: add_filter( 'bp_core_avatar_class', ...
6
votes
2answers
67 views

Better to fire specific hooks or generic hooks with paramaters?

I'm creating a form plugin to handle forms that can be hooked into using actions/filters by developers. My plug-in needs to be able to handle different forms with different sets of filters and I see ...
4
votes
1answer
77 views

Getting instance variable in scope of 'wp_enqueue_scripts'

I need a little help getting my head around passing instance variable to a hook. I am reading the CSS files I need in my template dynamically and storing them in a $settings object that I am keeping ...
5
votes
2answers
130 views

Using filters and actions for plugin API?

I want to integrate a public API to a plugin that I develop. The usual way other plugins integrate APIs is to define some functions that can be called by any theme or plugin. However, I think this ...
0
votes
0answers
26 views

How should I use a plugin function as a hook?

I'm using Expire Password plugin, an open source plugin to expire users. It actually lets you expire users from the Users admin page, individually. I need to create a new user from a front-end form, ...
0
votes
1answer
22 views

Seems that admin_post_{action} does not executing

I'm trying to proccess different actions of my plugin with admin_post_{action} hook. But following code seems not working class TestPlugin { function test(){ die('working!'); } ...
3
votes
1answer
115 views

the_content and wp_link_pages

Many plugins seem to be adding a filter/action hook to the_content to display related posts, advertisements and such. The problem is I these appear before the post pagination so it the pagination is ...
0
votes
0answers
14 views

Send email to post author 1 day before his project ends

I am running wordpress with a job board and I would like to integrate an automated email notification: Users post jobs as a custom post type. Freelancers can send proposals within 7 days. When 1 day ...
0
votes
0answers
35 views

admin_post hook error message passing

I've mocked up a quick skeleton plugin, I'm trying to catch the $_POST data from the form template. The best route that I've found is using the hook admin_post, unless there is a better alternative? ...
1
vote
1answer
34 views

Hook (or other way) to find out when another plugin is activated / installed

Is there some way to run a function when another plugin is being installed and/or activated? Basically I need something like register_activation_hook only for other plugins. The use case: I want to ...
0
votes
2answers
31 views

How do I override the user's input when updating a custom post type's permalink?

When publishing a custom post type, I'm trying to override the custom permalink based on code rather than what the user types into the input box. I can confirm my action is firing correctly, but I'm ...
0
votes
1answer
34 views

what is do_action(); in wordpress? [duplicate]

Sorry for making duplicate Topic but it is very important to me because i don't understand this topic by looking other related topics. Actually i am in process to build a WordPress theme and i am ...
0
votes
0answers
17 views

WP Hook Action API trigger function when User is Activated

I'm trying to find a WP add Action Hook, that responds to enabling and activating a User in User Profiles Admin. I have a members site, with a members blog that feeds to a members newsletter in ...
0
votes
1answer
35 views

Trying to send AJAX data to WordPress hook

I'm trying to send jQuery data via AJAX to a WordPress template file. I've tried several different techniques and solutions based on other questions posted that pertain to this topic, with no ...
0
votes
0answers
23 views

Sticking a post or page to the top of all WordPress pages, posts, index pages, etc

I'm trying to add the same common content (like an announcement, banner, or slider) to the top of all WordPress pages, posts, category archives, etc. Standard WordPress sticky posts are displayed only ...
0
votes
1answer
45 views

remove_action not removing add_action from constructor

I am trying to replace a message from a function that got hooked in a constructor from a class from woocommerce. This is what I tried to remove the message: What I tried. function remove_actions() ...
0
votes
0answers
17 views

custom forgotpassword and hook for additional function

I have other app and a wordpress, whenever if there is a lost password request in the wordpress, it will also trigger for lost password request and other function for the app API.. the password ...
0
votes
1answer
53 views

Using init hook for register_taxonomy is causing invalid_taxonomy in wp_insert_term()

I'm developing a plugin and I've problem with inserting new term to my custom taxonomy. <?php add_action('init', 'create_tax', 0); function create_tax() { $args = array(...); ...
0
votes
1answer
74 views

WordPress Plugin Boilerplate - add_action hook in static “activate” function

I'm hoping someone can point me in the right direction here. I'm using the Wordpress Plugin Boilerplate to develop a custom plugin. On install, the plugin will register a new post type (course), a ...
0
votes
2answers
109 views

Manage users custom column add class “num”

I have customized my admin users column to show the purchased leads of a role "lead buyer". The value of the column is a decimal (the number of leads). The "posts" column of the users table has a ...
0
votes
1answer
18 views

Hook Adding content after title

I need to add something after title in loop in single post and page, home page, categories. This is for a plugin and i don't want to modify the theme directly. function after_title($title) { ...
1
vote
0answers
23 views

Add media library tab

I'm trying to make a new tab in the media library. I have found the function add_media_page which helps me add a page in the media menu to the left. How ever, this menu is not always visible, for ...
0
votes
0answers
9 views

How to create a hook that can give points for either how many pages viewed by user, or pages viewed by a user's posts?

I started a blog recently and I liked the achievements idea. I installed two plugins both which I like, one is called Achievements and the other is called WordPoints. Specifically, I would like to ...
0
votes
1answer
65 views

Best Way to get facebook share count and update using wp_schedule_event or any other method

I recently developed a news blog, and my client needs facebook share count. I Successfully able to get the share count and update the custom field using below code.(with the help of cybermeta). What ...
0
votes
1answer
35 views

No result update a custom field using wp_schedule_event

I recently developed a news blog. My client asked for a facebook share count of an article. I am able to get the share count using facebook api, However, according to the information I found from ...
2
votes
1answer
61 views

Send an email when custom post type category is changed

This is the first time I've attempted to write an action hook. My CPT has 4 categories. I'm trying to make WP automatically sends an email notification when the category is changed. By change I ...
0
votes
2answers
31 views

Embeding style into the header via the function.php

I'm trying to add the following hook into my functions.php file. The CSS style shows up when I view the source code but it also show the php code for the random background image generator. How can I ...