Submit plugin for review

Most likely, your header is not complete, or not up to the standards. It can also be a problem with the readme.txt file that also requires very specific structure. Start by reading the guidelines, and check some other plugins to see how the plugin should be organized correctly: Detailed Plugin Guidelines.

Plugin to reformat the post automatically after submitting

You should use the transition_post_status to filter the content after submitting the post. Try the below code in the functions.php in your theme: add_action( ‘transition_post_status’, ‘_new_post’, 10, 3 ); function _new_post( $new_status, $old_status, $post ) { if ( ‘publish’ !== $new_status or ‘publish’ === $old_status ) { return; } if ( ‘post’ !== $post->post_type ) … Read more

Api external with wordpress

WordPress itself can communicate with external API’s through wp_remote_get and wp_remote_post. See the codex. In your case, you could create a page template called page-search.php (keep in mind that search.php is reserved for the internal WordPress search functionality, so you would define it as a template, and select it when creating the page), and run … Read more

External wpdb connections in different plugins on single page

You’ll have to make the variable global when you define it, e.g. global $mydb; $mydb = new wpdb(‘username’,’password’,’database’,’localhost’); and then use global $mydb; in the other plugins. Aside from theme files, functions.php, and plugins while being loaded, pretty much nothing in WP runs in global context, so if you need to access global variables, you’ll … Read more

remove ad to cart button and view more button if product price is empty

Add this in function file for hide add to cart button function wpa_109409_is_purchasable( $purchasable, $product ){ if( $product->get_price() == 0 ) $purchasable = false; return $purchasable; } add_filter(‘woocommerce_is_purchasable’,’wpa_109409_is_purchasable’, 10, 2); Visit this link for more detail Woocommerce – Hide “add to cart” on free products

Delete Media not attached with Any posts

You can also do this direclty from your WordPress Dashboard. Login to your website and go to media for the same. In the media, select list view and filter the media which are Unattached to the post. Once you get the filtered media items, select all items and delete the same using Bulk Actions. The … Read more

Is there a counter for comments left?

You can use get_comments() function to retrieve comments by user_id or you can modify the below to also accept author_email or multiple authors. It will then only return the Comment IDs as an array and count them up, returning the integer which could be 0. /** * Count and return number of comments by User … Read more

CSS reset for plugin’s front end?

In a plugin your styling should blend with the styling of the theme and not override it, therefor style “reset” is just not something you should do. On the contrary, it is better to have an option in your plugin to emit just HTML with no styling at all as it is hard to style … Read more