Method by which plugins and themes extend core WordPress functionality.

learn more… | top users | synonyms

0
votes
0answers
10 views

Trying to add a list of 4 products below each subcategory title on the Product Category page

I am trying to add 4 products below each of the subcategories for the Product Category page, these should be 4 products from the specific category. Picture below to explain: http://imgur.com/0ziqRGp ...
0
votes
0answers
13 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
17 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
34 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
18 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
22 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
28 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
28 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
18 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
20 views

add_filter to 'woocommerce_before_main_content'

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
47 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
21 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
34 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
69 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
12 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 ...
0
votes
0answers
19 views

how to remove sidebar on single post- and sub-pages using hooks/actions (Omega theme by Themehall

I've created a child theme from the 'Omega' parent theme by Themehall. I'm trying to remove the sidebar on all single post pages and sub pages of my blog and instead have a single full-width column ...
1
vote
1answer
40 views

Issue adding text after short description on product pages Woocommerce

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
9 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
5 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
21 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
35 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
66 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
49 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
22 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
36 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
30 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
32 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
29 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
38 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
46 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
30 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
86 views

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
27 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
29 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
34 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
18 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
45 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
26 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
23 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
41 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
103 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
115 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
15 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
24 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
27 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
136 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 ...