WP CLI not importing media files

wp import something.xml The possible problem with this solution is when the original domain is not available from the web server you are on. Try to ping the domain name from the AWS LightSail. You know for the wpcom-themes.svn.automattic.com/demo/theme-unit-test-data.xm‌l, there you have images like wpthemetestdata.files.wordpress.com/2010/08/manhattansummer.‌​jpg, but when the domain wpthemetestdata.files.wordpress.com is not available anymore the … Read more

How to restrict CPT post’s fronted view only for specific user roles?

You can filter the_content to make sure only people with the right cap can see it: function filter_the_content( $content ) { // Check post type is book // and that the current user is not lite user if (get_post_type() == ‘book’ && ! current_user_can( ‘read_book’ ) ) { // return a message in place of … Read more

Swapping wp_dropdown_categories function with wp_category_checklist

As you are not working with the default categories but with another taxonomy instead you must not use wp_category_checklist(). Instead you should probably be using the more generic wp terms checklist(). The signature of this function also differs from the one of wp_dropdown_categories(). And the arguments array takes completely different options. You shlould start with … Read more