Action while post is being published

It sounds like you’re looking for the publish_post hook which (per the Codex): Runs when a post is published, or if it is edited and its status is “published”. Action function arguments: post ID. Alternately, there’s save_post which is triggered whenever a post or page is created or updated, which could be from an import, … Read more

Fix incorrect related posts code snippet

Your first problem: Try to write down what you want to do: You do not want to print posts that are already printed. So you have to remember what posts are already printed. In PHP normally an array is a good solution to remember things that are already done. Let’s add an array: $printed_posts = … Read more

WooCommerce Order Status Displays Twice on Order Page

Solved it. I used the plugins_loaded hook, like this: add_action(‘plugins_loaded’,’example_function’); function example_function(){ remove_action(‘manage_shop_order_posts_custom_column’, ‘woocommerce_custom_order_columns’, 2); add_action(‘manage_shop_order_posts_custom_column’, ‘match_order_woocommerce_custom_order_columns’, 2); }

Call a function with href

You can echo the return value of a function: <a href=”https://wordpress.stackexchange.com/questions/102196/<?php echo plugin_function(); ?>”> But without seeing the actual function, there is no way to give a more specific answer.