Block wordpress style for my plugin admin page

The admin stylesheets combines rules for everything: tool bar, left menu, footer and some common elements like tables and forms. You cannot disable just a part of it. If you want to apply your own rules, use a higher specificity in your CSS rules. Normally, all plugin pages use the same wrapper element: <div class=”wrap”> … Read more

How to use add_action for multiple instances of the same class

When you call add_meta_box() you must provide a unique ID as the first parameter. Consider this case: add_meta_box( ‘foobox’, ‘Foo Title’, ‘foo_callback’ ); add_meta_box( ‘foobox’, ‘Bar Title’, ‘bar_callback’ ); You will just get the Bar Title metabox now, because it will overwrite the first one. What you need is a new ID for each box: … Read more

wordpress plugin license issue -New plugin development

You have to find out how the plugin is licensed that you are going to use. Then read the details of that licence. Usually the least to do is to mention the author and/or name of the plugin used. For reference WordPress is licensed under GPLv2 (or later). The WordPress License

How can I apply no-disposable when programmatically adding a user with wp_insert_user()?

What the plugin you mention does is apply a filter to registration_errors, which is used by a function called register_new_user. The quickest and easiest solution would be to use that function instead of wp_insert_user. If that isn’t possible or your code design doesn’t allow it, you can always call no_disposable_email directly, and before wp_insert_user. $errors … Read more

How to display a number of posts based on a Advanced Custom Field (ACF)

Found an answer to my question using the ACF plugin get_field function (http://www.advancedcustomfields.com/resources/functions/get_field/) to retrieve the value of the custom field, save it as a variable and then use it as part of the query_post parameters: <!– Modify query object –> <?php $num_news = get_field(“number_news”, 523); // number of news items to feature query_posts(‘showposts=”.$num_news.”&post_type=news’); ?> … Read more

How to access the WordPress DB from a plugin file

If you plan to share/sell your plugin I strongly suggest don’t load your plugin directly. That because to load WordPress you need to load the bootstrap file, that is /wp-load.php so, you should put in your embed-video.php something like: require ‘/wordpress/path/wp-load.php’; Do you notice the problem here? The /wordpress/path/ part is different for user to … Read more