How to Disable JSON REST API in WordPress

WordPress 4.4 added the much anticipated JSON REST API. It is great for plugin developers, but many site owners may not find it useful at all. In this article, we will show you how to easily disable the JSON REST API in WordPress. Why You… Read More »

The post How to Disable JSON REST API in WordPress appeared first on WPBeginner.

WordPress 4.4 added the much anticipated JSON REST API. It is great for plugin developers, but many site owners may not find it useful at all. In this article, we will show you how to easily disable the JSON REST API in WordPress.

Disable JSON REST API in WordPress

Why You Need to Disable JSON REST API in WordPress?

There is no denying that the API will bring lots of benefits for WordPress developers. However, some website owners may not be using those features at all. The API makes it super easy to retrieve data using GET requests. This is extremely useful for those building apps with WordPress.

Having that said, this could potentially open your website to a new front of DDoS attacks. It can be resource intensive and slow down your website.

It is similar to disabling XML-RPC, which many site admins disable on their WordPress sites just to be on the safe side.

Disabling JSON REST API in WordPress

If you want to disable JSON REST API on your WordPress site, then you can easily do so by simply adding the following code in your theme’s functions.php or in a site-specific plugin.

add_filter('json_enabled', '__return_false');
add_filter('json_jsonp_enabled', '__return_false');

This code simply uses the built-in filters to disable the JSON and JSONP APIs.

For those of you who don’t want to manually add the code, you can install and activate the Disable JSON API plugin. The plugin works out of the box, and there are no settings for you to configure. Simply activating the plugin will disable the API on your site.

We hope this article helped you learn how to Disable JSON API in WordPress. Security conscious users may also want to checkout these tips on protecting WordPress admin area.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Google+.

The post How to Disable JSON REST API in WordPress appeared first on WPBeginner.

How to Move Comment Text Field to Bottom in WordPress 4.4

Did you notice that there was a slight change in the comment form fields in WordPress 4.4? The comment textarea is moved to the top whereas the Name, Email, and Website field is moved to the bottom. One of our readers asked if there was… Read More »

The post How to Move Comment Text Field to Bottom in WordPress 4.4 appeared first on WPBeginner.

Did you notice that there was a slight change in the comment form fields in WordPress 4.4? The comment textarea is moved to the top whereas the Name, Email, and Website field is moved to the bottom. One of our readers asked if there was a way move back the comment text field to the bottom. Yes, there is because we did it on our site. In this article, we will show you how to move comment text field to the bottom in WordPress 4.4 and later versions.

Move comment field to bottom in WordPress 4.4

Why Comment Form Text Layout Was Changed?

The decision to move the comment form text field to the bottom was made to fix a bug in WordPress comment form layout.

Previously when users clicked on reply button they were taken to the comment text area. If a user was on desktop, then they can clearly see that they need to fill in the name and email fields first.

But on mobile, users may not even see the comment name and email fields. They may write and submit a comment only to return back with an error that they forgot to enter name and email fields.

This was bad from usability and accessibility point of view and WordPress 4.4 addressed that issue.

This is how the default comment form looks like now.

New comment form layout after WordPress 4.4

While this change improves usability, some site owners believe that their users are used to the old layout and want to switch back. Here is how you can do that.

Moving the Comment Text Field to Bottom

Simply add this code snippet in your theme’s functions.php file or in a site-specific plugin.


function wpb_move_comment_field_to_bottom( $fields ) {
$comment_field = $fields['comment'];
unset( $fields['comment'] );
$fields['comment'] = $comment_field;
return $fields;
}

add_filter( 'comment_form_fields', 'wpb_move_comment_field_to_bottom' );

That’s all, you can now visit a post on your website as a logged out user and see the change in action.

Comparing comment forms before and after moving comment text field to bottom

We hope this article helped you move comment text field to the bottom in WordPress 4.4. You may also want to see our guide on how to improve WordPress comments with De:comments.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Move Comment Text Field to Bottom in WordPress 4.4 appeared first on WPBeginner.

What’s New in WordPress 4.4

WordPress 4.4 was released just a few minutes ago. This will be the last major WordPress release of 2015 and as expected it comes with a new default theme and some other great features. In this article, we will show you what’s new in WordPress… Read More »

The post What’s New in WordPress 4.4 appeared first on WPBeginner.

WordPress 4.4 was released just a few minutes ago. This will be the last major WordPress release of 2015 and as expected it comes with a new default theme and some other great features. In this article, we will show you what’s new in WordPress 4.4, and which features you should try after updating your websites.

This is a major WordPress release, and unless you are on a managed WordPress hosting service, you will have to manually initiate the update.

Important Don’t forget to create a complete WordPress backup before starting the update.

Features and screenshots of the new WordPress 4.4

Responsive Images Out of The Box

The number of devices, screen resolutions, and display sizes add to the complexity of serving better quality images. Using CSS and other solutions can make images fit on mobile devices, but you really don’t need that anymore.

WordPress 4.4 comes with responsive images out of the box. WordPress will automatically serve the right image size for the user’s browser, device, and screen size.

This is done using the srcset attribute in img HTML tag. It allows client’s browser to display an image based on device capabilities. Since it works out of box, you don’t need to do anything. It uses a filter to add srcset attribute on the fly.

WordPress powers more than 25% of all websites on the internet. Users accessing WordPress powered websites will not waste bandwidth on loading images too large for their screen.

You will still need to optimize your images to speed up WordPress.

Externally Embeddable

WordPress has been using oEmbed to embed videos, tweets, status updates, and content from other sites that supported oEmbed.

Starting from 4.4, all WordPress sites will become an oEmbed provider. This means WordPress users will be able to embed posts from other WordPress sites.

Embed posts from other WordPress sites in your blog

If you don’t want to use this feature, then you can disable it with the plugin called: Disable Embeds.

Twenty Sixteen

In 2010, WordPress 3.0 came with a new default theme Twenty Ten. Since then, each year WordPress releases a new theme.

As the last release of 2015, WordPress 4.4 comes with a brand new Twenty Sixteen default theme. Here is how it looks:

Twenty Sixteen the new default WordPress theme for 2016

This theme is beautifully designed with a mobile first approach. It is fully responsive on all screen sizes and devices.

Twenty Sixteen comes with the traditional content+sidebar blog layout. However, the sidebar is optional, and you can have full-width pages if you want. It has built-in color schemes, and you can also use your own colors to make it uniquely yours.

Twenty Sixteen in theme customizer

Under The Hood Improvements

The best thing about WordPress is that it can be easily extended with plugins and has thousands of themes that you can use.

WordPress 4.4 brings some exciting changes and improvements for developers. This means that you can expect more features and updates from your favorite WordPress plugins.

Phase 1 of Rest API

WordPress 4.4 initiates the inclusion of REST API plugin into WordPress core. This will allow WordPress developers to create new APIs or work on the existing WordPress APIs in their own applications. Plugin authors will also be able to take advantage of the REST API by adding custom end points. (#33982)

WP_Network for Multisites

There are many under the hood improvements for multisite networks in WordPress 4.4. Most important one is the introduction of WP_Network class. It provides a better way to handle multisites and fixes several bugs. (#31985)

Taxonomy Term Metadata

With WordPress 4.4, Terms in taxonomies (like Categories and tags or any custom taxonomy) can now have metadata associated with them. (#14162)

Improved Comment Queries and Output

Comment object and query is improved with the introduction of WP_Comment class. (#32619)

Comment form output is now changed to display the comment textarea first and then name, email, and URL fields. (#29974)

New comment form output displays textarea first and then name, email, and website fields in comment form

We hope this article gave you a good overview of what’s new in WordPress 4.4. We are particularly excited about responsive images and improved embeds. What are you excited about?

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post What’s New in WordPress 4.4 appeared first on WPBeginner.

What’s Coming in WordPress 4.4 (Features and Screenshots)

Development for WordPress 4.4 started with full momentum immediately after the release of WordPress 4.3. We followed the development closely, and we are excited to report that it is expected to be released during the second week of December 2015. In this article, we will… Read More »

The post What’s Coming in WordPress 4.4 (Features and Screenshots) appeared first on WPBeginner.

Development for WordPress 4.4 started with full momentum immediately after the release of WordPress 4.3. We followed the development closely, and we are excited to report that it is expected to be released during the second week of December 2015. In this article, we will show you what’s coming in WordPress 4.4 with features and screenshots.

WordPress 4.4

Note: You can try out the beta version on your computer or on a staging environment by using the WordPress Beta Tester plugin.

Twenty Sixteen – The New Default WordPress Theme

Since 2010, WordPress comes with a new default theme for each year. Keeping up with this tradition, WordPress 4.4 comes with a new default theme for 2016, called Twenty Sixteen.

Twenty Sixteen - Default theme in WordPress 4.4

Twenty Sixteen features the traditional blog layout with a sidebar and content area. The design focuses on readability and elegant display on all devices.

It comes with five color schemes Default, Dark, Grey, Red, and Yellow. Users can also choose their own colors to create unlimited color schemes.

It supports custom headers, and has two menu locations one for site navigation and other for social links.

Twenty Sixteen customizer

Responsive Images Out of The Box

Users access the web using lots of different kind of devices with different screen sizes, resolutions, pixel density, etc. Low resolution images look unimpressive on devices with larger screens and better displays. This compels site owners to use better quality images which increases the page size and effects download speeds.

Responsive images in WordPress 4.4

WordPress will now provide a better solution to address this problem by showing responsive images out of the box. This is done by using srcset attribute. This attribute allows client’s browsers to display an image based on device capabilities.

The srcset attribute is added on the fly and is not stored in the database. This means all images you previously added will benefit from this feature.

All images added to a post, featured images, attachment pages, and image galleries will be responsive out of the box. This will greatly improve page speeds and user experience on WordPress sites.

Better Embeds

WordPress users can automatically embed videos, Tweets, and Facebook status updates by simply entering their URL in a post. However, this feature was limited to only some sites that were whitelisted by the WordPress project.

With WordPress 4.4, it would be possible for you to add embeds from any site that supports oEmbed. This also includes all WordPress sites.

If you add a plain URL in your post from another WordPress site, then it will automatically embedded.

Better embeds

Note: Both sites should be using WordPress 4.4 or higher for embeds to work.

If you were previously using a plugin to embed WordPress links as content cards, then you will not be needing those plugins anymore.

Developer Features

WordPress 4.4 will be coming with lots of under the hood improvements and changes. Developers will need to adjust code in some of their products.

WordPress REST API (Phase 1)

Finally, the underlying infrastructure for WordPress REST API plugin is added into core with WordPress 4.4. REST API allows WordPress developers to create new APIs or work on the existing WordPress APIs to in their own applications. With 4.4, plugin authors will be able to take advantage of REST API by adding custom end points.

Taxonomy Term Meta Data

Taxonomy term management has been going through some changes since last few releases. This enters into new stage with WordPress 4.4 which brings taxonomy term meta data capability into core. Terms in taxonomies (like categories and tags or any custom taxonomy) can now have meta data associated with them. (#14162)

Comment Queries

Comment queries will be split for better and faster performance. (#8071, #32619)

We hope this article gave you a preview of what’s coming in WordPress 4.4. Let us know which features you are excited about and what you would like to see in future releases of WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post What’s Coming in WordPress 4.4 (Features and Screenshots) appeared first on WPBeginner.