Follow below steps to install the WP CLI on your Windows operating system. Step 1 Create folder wp-cli in C drive. Step 2 Download wp-cli.phar from https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar Step 3 Move downloaded wp-cli.phar file in C:\wp-cli\ Step 4 Create wp.bat file in C:\wp-cli\ and write below code in it. Or Download file from below Gist Step
Solution: Add below filter to fix the file permission issue of WooCommerce. The reason of this issue is: Getting different REAL MIME type from function finfo_file. The issue maybe the different Operating Systems or due to Different PHP versions. But, While debugging the issue, When I try to upload the XML on localhost I got the text/xml as
Sorry, this file type is not permitted for security reasons due to WordPress 5.0.1 MIME validation for uploaded files fix for wp_handle_sideload()
We are going to see how to use the Alignment package into the Sublime Text 3. Table of Content Introduction While development it is nice to see the code with well-aligned or with good indentation. Most of the users may use the PHPStrom, VSCode, or something else. They have some extensions which do the same
In development, We spend a lot of time on the command line. We type a lot of commands on regularly. I have created a shortcut for the most of the commands which I use on a daily basis some of them are below: WP CLI Command Keyboard Shortcut/Aliases wp theme list wpthl wp plugin list
It convert a value to non-negative integer. Internally this function used abs( intval( $maybeint ) ). You can try below examples yourself. Examples Output var_dump absint( 0 ) 0 int(0) absint( ‘0’ ) 0 int(0) absint( 1 ) 1 int(1) absint( ‘8’ ) 8 int(8) absint( -27 ) 27 int(27) absint( ‘-8’ ) 8 int(8) absint(
You can now download the Theme Unit Test for testing your theme or import the WooCommerce, bbPress plugin sample data with simple ONE click using WordPress plugin Sample Data. Note: Use Sample Data plugin on your testing/staging environment. Quick Start: Follow below simple steps to import the dummy content: Install & Activate plugin. Click on Get Started » from plugin/theme. It read the
Import the bbPress sample data with one click.
Envato released the plugin Envato Elements – Template Kits (Beta) plugin to import the templates. It supports now for Elementor & Beaver Builder page builder. Plugin URL: https://wordpress.org/plugins/envato-elements/
In this article we are going to see how to use Wget to find the broken links from the website. Try below example command which generate the wget.log it list all the broken links. Download & Install wget Add the installation directory to PATH:C:\Program Files (x86)\GnuWin32\bin Syntax: wget -o wget.log -r -l 10 –spider http://example.com Usage: wget
Below is the simple function which you can use for debugging the site. It display the template file path of the current page. Like below image: Add below code snippet into your themes functions.php file. <?php /** * Check Which Template Loading * * @todo Change the `prefix_` from function name with your own prefix.
This array defines mappings between public API query parameters whose values are accepted as-passed, and their internal WP_Query parameter name equivalents (some are the same). Only values which are also present in registered will be set. Below is the list of all the endpoints which have query parameters mapping: wp/v2/comments wp/v2/<post-type> wp/v2/<taxonomy> wp/v2/<term> wp/v2/<users> Check below
With the Rest API we get all the posts. But, Sometimes we want to get only specific posts by post ids. WordPress have rest API parameter include which return only requested posts by post ids. Syntax https://example.org/wp-json/wp/v2/posts?include=<post-ids> Example https://example.org/wp-json/wp/v2/posts?include=11,12 It return only 2 posts whose ids are 11 & 12. Note: By default it return 10
WP-CLI is the command-line interface for WordPress. You can update plugins, configure multisite installs, and much more, without using a web browser. Below is the complete list of WP CLI commands generated with WP CLI Commands Cheat Sheet (Complete List of WP CLI Commands) Cache wp cache add Docs | Git wp cache decr Docs | Git
WordPress provides the Rest API support for post, pages and custom post types which have set the show_in_rest parameter as true. We have also the Rest API support for the tags, categories and custom taxonomies which have same show_in_rest parameter as true. Table of content Overview We have Rest API endpoints for the post &