Articles of plugins

How to check if wp_update_post was successful

I want to update a post using wp_update_post( $my_post ); How can I check if it was successful? Should it return the post ID on successful update? I’m trying this: $post_id = wp_update_post( $my_post ); if ( $post_id ) { echo “successful”; } else { echo “fail”; } The above code does not return any […]

Change plugin's has_archive = true to false?

When a plugin registers a post type and sets has_archive to true, is there a way to change it to be false? I don’t want the plugin’s post type to have an archive, but can’t figure out how to turn it off. A similar questions was asked here, but has no responses: Changing a custom […]

Overwrite or Replace code in WP_Footer

I have a some code being dynamically added into my Footer via add_action(‘wp_footer’ …). Unfortunately I’m not sure how to remove it using conventional methods, I’ve looked at the following question and tried to use the solutions there: remove_action or remove_filter with external classes? But had no luck with any of the answers so now […]

Display success message after wp_update_post

I want to display a success message on updating a form from front-end using wp_update_post at the top of the form. I use below on edit page $post_id = wp_update_post($edit_post); and defined function function write_here_show_success_messages( $success_msg ) { echo ‘<div class=”form-success”>’; echo ‘<span>’.$success_msg.'</span><br/>’; echo ‘</div>’; } How do I execute this function when the form […]

How to Add TinyMCE's plugin in wordpress?

I had found a TinyMCE’s plugin that change the direction of selected text. How to add this plugin in wordpress? Any one guide me? I had tried to add it in /wp-includes/tinymce/plugin/custom-dir/plugin.js but what to do next to register it with wordpress. Its basic question but I am new to WordPress. Thanks

Last modified field for user profile?

Is there a plugin or a known way to track user profile changes and save a last modified date in WordPress? I tried with ACF, but it doesn’t have an option to auto update this field. Thanks in advance.

How to activate plugins for my WordPress sites from a remote server

I have been thinking of managing a set of wordpress sites from a remote server.I would like to get information on plugins that has been installed on my wordpress sites.I would also like to install plugins to the corresponding wordpress sites from my remote server.I have searched and found that XMLRPC might help in retreving […]

Do We Need to Validate, Sanitize, or Filter Simple Numerical Superglobals (Cookies and Post)?

I’m writing a plug-in that stores UNIX datetimes in browser cookies and that also uses a $_POST variable based on a simple form that sends the ID number of the current WordPress post. After reading several articles and posts on sanitization and validation in WordPress and PHP, I haven’t found any that deal much or […]

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 new taxonomy (course-areas) and set up permalink structures for the new post type and taxonomy. I’ve added my code (to create […]

How to Know if a Plugin can be used with my Theme

I am new to wordpress & I am using a paid theme on my site I want to know how I can identify if a plugin is good suit for my theme or not? I had to remove all the plugins on my site because it crashed the theme & I was not able […]