hooks's questions - English 1answer

1.568 hooks questions.

I'm trying to add a custom class to input HTML tag at a checkout page in WooCoomerce. For example: I want to add .smartform-zip to input with name billing_postcode and same thing with ...

I am trying to add a style attribute on all the custom gravatar images. However, it is removing the style attribute before final output. Here is the code I am using: $background = ''; $args = [$...

I am struggling with this problem for hours now, what is going on is that somewhere before inserting the values into the db, this action is being called. do_action_ref_array('h5p_alter_user_result', ...

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'greenday_head' not found or invalid function name in /home/xnvrtebr/public_html/Blog/wp-includes/class-wp-hook.php ...

Featured Image Action Hook

1 answers, 21 views hooks
Is there a hook available that returns the featured image, once a featured image is set to a post? I checked Which action hook can I use when a featured image has been selected and the action hooks ...

I have a foreach loop inserting posts. And I already have statements to check if post already exists by unique meta values. But somehow, often when site is loading slowly, something strange happens ...

I need to add a theme-switching logic to a site. Unfortunately, what I've tried already doesn't seem to work as required. The themes needs to switch based on whether the user is on the blog part of ...

for a project I have to extend the core block core/cover-image. For the first basic try I came up with the following code: PHP: add_action('enqueue_block_editor_assets', function() { ...

I have good experience in other CMS. but I'm very new in Wordpress. My goal is to intercept POST values in some of the form of a pre-existent site. Following documentation I've done the following ...

I'm working on a Wordpress integration and updating our WP JSON api v1 to v2. We have custom post types which use two custom meta-fields. One of them should be preserved to the WP's database while ...

In WooCommerce, I am looking for a function to change the "Place Order" text if cart has a specific product(ID) on checkout page. This is useful for woo shops selling product and at the same time ...

I am developing a plugin which will show the caller of all the Hooks & Actions on a Page in Wordpress just like QueryMonitor. I know that global $wp_action & $wp_filter has all the information ...

I have a custom post type called "Magazine" shown in the admin interface. Everytime a user uploads a file in the wp-admin to my custom post type "Magazine", I want to fire a hook because I have to ...

I am developing a Plugin, and want to record Time taken by each Action Hook, I am able to get all the Hooks Triggered on a Page with the Action and Priority, but i am unable to get the Time taken by ...

The form is in post creating window. Ajax is posting values, but the values doenst renews. Where can be problem ? Ajax <script> function dynamic_Select(field, aid, value) { console.log(...

I'm setting up my page as follows: add_action( 'admin_menu', [$this, 'addAdminMenu' ], 80 ); And its content: public function addAdminMenu() { $this->hook_suffix = add_theme_page( ...

I have a function that adds a class based on various statements, certain pages, cpt's you're on etc. I put this function in various sections within the page for styling purposes using <?php ...

Is there a way to trigger the post saving or updating event in code? such as do_action('save_post', $post_id); The function here seems to imply that a WP_POST object needs to be passed in. Is there a ...

I'm using Ultimate Member plugin with extensions Real-time Notifications and Followers. I need users to get notifications when users, they are following to, publish new blog post. I can't get any ...

I have process_ipn method that runs on init action hook. Looks like it is fired after PayPal returns to merchant. Under this method, I could find out the payment status such as completed, pending, ...

I am using the wp-job-manager plugin and i want to add an Adsense code between the job listings ( after fifth job listing ) in the page with [jobs] shortcode. The function that outputs the jobs ...

What I want is to get the output of the Twitter oEmbed system into my actual posts. IMHO the embed output itself is high-quality, semantic HTML and I'd rather have it inside the post than in the embed ...

I'm trying to unregister a post type from a child theme but I haven't been able to do so, the code in the funcions.php file on the parent theme is something like this: add_action( 'init', '...

im trying to redirect users on specific categry with this hook: // Show app-data posts only to app users function user_redirect() { if ( is_category( 'app-data' ) ) { $url = site_url(); ...

i need to Delete wp_terms -> name field when a user is delete . my requirement is admin needs to assign posts to specific users, that is admin need to add a post to user1 ,but user2 should not see ...

I am developing a e-commerce theme that requires an order page. I created a php file inside my theme folder named order-page.php and hope to access this page from the wordpress root url (example.com/...

publish_post Runs when a post is published, or if it is edited and its status is "published". Action function arguments: post ID. -Plugin API Documentation I've added the publish_post hook to ...

Do these hooks listed on the following site work for custom post types? http://www.wphub.com/custom-post-type-publish-action-hook/ // function to be executed when a custom post type is ...

I have a plugin and I would like to be able to run the post content through some filters before it is saved to the database. From looking at the plugin api, I see that two hooks that look like they ...

<?php function default_menu() { <form action="options.php" method="post"> <?php settings_fields( 'sample_check' );?> <input type="checkbox" name="sample" value="nofollow"/> </...

I'm looking for a way to separate user accounts per blog/sub-site. I concocted a plan to hook into login/registration process and append the blog_id to the username and email upon one of these actions....

I would like to write a little script that does a check whenever an order is created in WooCommerce (right after checkout) and then conditionally changes the Shipping Address of the customer. I think ...

I have a custom post type that always do math operation to its post_meta and other custom post type post_meta. For example: post-type 1 = cpt_product_order post-type 1 post_meta = ...

I was able to successfully set the default page template for a new page, when there is not yet a defined template to be 'member_home_page.php. This works perfectly on my local environment but when I ...

over the last week I have been working on some cron jobs for a real-estate website that has hundreds of updates/deletes and new posts added each day. I am very near the end now and looking to ...

I am attempting to make some pretty serious template customizations to some of my plugins (mostly Event Espresso). Obviously I don’t want to touch the core stylesheets and template files, since they’...

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 ...

Hooking into the script_loader_tag hook and generating random strings is no problem, but how can I generate them once per page load and use them in both wp_head and script_loader_tag? I'd really like ...

I would need to apply some sort of encryption on whatever gets inserted in the wp_post > post_content, so I was wondering if there is a way, either modifying the core (rather not), or using some ...

In latest WordPress if web page has <input type="hidden" name="action" value="action_name"> input field with name=action then it create console log error. But this happen maybe 4.9.5/6. However....

I know, my question is general and here is some similar questions, I checked the all, but I dont find any solution for my problem... I try using the wp_trash_post() in my function.php, but for some ...

I have Used the function dynamic_sidebar('sidebarId') in the sidebar.php file. and all the functionality of the sidebar is Working succsessfully My Question is How To Change the Html of the sidebar ...

I have a plugin that will automatically load articles from a news publisher by checking query vars in the URL. If an article was requested, it does an AJAX call to this publisher, creates a new ...

I've added support for datepicker on date fields in entry detail edit admin page of Gravity Forms. I did this by simply enqueuing the gform_datepicker_init script in admin_enqueue_scripts hook. This ...

Basically, when I view the All Posts page in Wordpress Admin, I want to filter out all posts from a specific category to now be shown there. After some searching, I found this hook but it's not ...

I have a large .xml (WXR) export from a historic WordPress site (6,000+ posts). I have installed the WordPress Importer plugin, and I'm able to use it to import the file. Whilst all posts' text gets ...

<?php namespace wp_gdpr_wc\controller; use wp_gdpr\lib\Gdpr_Language; class Controller_Menu_Page_Wc { const PRIVACY_POLICY_TEXT_WOO_REQUEST = 'gdpr_priv_pov_text_woo_request'; const ...

Is there any way to change the order of filters for e.g. the_content before they are applied? What I currently have is the following ideas: /** * Print all filters for some hook. */ function ...

I am using plugins that fire action hooks before and after a post save. When a post is saved the functions hooked into those actions perform some calculations and put the results into a custom field. ...

I want to add a custom class to anchors in wp_nav_menu outputs. Default for example is: <li id="menu-item" class="menu-item menu-item-type-custom"> <a href="http://example.com">...

Related tags

Hot questions

Language

Popular Tags