making a simple plugin

Welcome to Stackoverflow. I think First of all you need to learn How to Google search. After that you can start writing your plugin. Well Here is the WordPress Plugin Handbook https://developer.wordpress.org/plugins/. As it states The Plugin Developer Handbook is a resource for all things WordPress plugins. Whether you’re new to WordPress plugin development, or … Read more

WP Offload S3 Lite “Please setup GD or ImageMagick” noticed

Create a file called phpinfo.php in your DocumentRoot <?php phpinfo(); ?> Run it from the command line (php phpinfo.php), check for the gd section. If the gd section is missing, you didnt install gd. Now run the same file from the browser (http://domain.com/phpinfo.php) and again check the gd section. My guess is that the browser … Read more

How to display blog posts only authored by the administrator

Four changes to your script. Limit $users to users with ‘administrator’ role. Removed line if($user->caps[‘Administrator’]!=1) continue; as every user is an administrator. Changed ‘post_per_page’ to -1, to process all posts. Added wp_reset_postdata(); after each loop: $users = get_users( array( ‘role’ => ‘administrator’ ) ); foreach ( $users as $user ) { $query = new WP_Query( … Read more

How to do Conact form 7 name field validation? [closed]

According to the documentation you have to create a custom filter to support it – you can do it like this: add_filter( ‘wpcf7_validate_text*’, ‘custom_text_validation_filter’, 20, 2 ); function custom_text_validation_filter( $result, $tag ) { if ( ‘your-name’ == $tag->name ) { // matches any utf words with the first not starting with a number $re=”/^[^\p{N}][\p{L}]*/i”; if … Read more

Visual Composer Data Source?

I found this in the raw category template in the woocommerce files. <?php /** * The template for displaying product category thumbnails within loops * * This template can be overridden by copying it to yourtheme/woocommerce/content-product_cat.php. * * HOWEVER, on occasion WooCommerce will need to update template files and you * (the theme developer) will … Read more

How to delete unnecessary custom post types in the UI

Currently there is no way on the backend (UI) for unregistering a post type, the process however is quite simple. Andrew Nacin provided some code over on https://core.trac.wordpress.org/ticket/14761 You can easily create a plugin with this function and have the CPT unregister. if ( ! function_exists( ‘unregister_post_type’ ) ) : function unregister_post_type( $post_type ) { … Read more