Recommended WordPress Plugins
Tags: php, wordpress, webdev
Published: 2020-10-24 19:49:06

For the past year or so I’ve been working on some WordPress heavy projects. Personally, I don’t particularly enjoy the “fronty” aspects of WordPress and always prefer to leverage the  [WordPress API](https://developer.wordpress.org/rest-api/)  and use WordPress as the awesome content management system that it is.

The huge community of WordPress developers creates awesome tools and plugins all the time and it is impossible to follow and keep up with all the new WordPress stuff out there. So, in this post I just want to share a list of WordPress plugins that I use on a daily basis and have saved me a lot of coding time. These plugins have changed my WordPress workflow so much that I use most of them as  [must use plugins](https://wordpress.org/support/article/must-use-plugins).

### Duplicate Page

Duplicate Page will add a “duplicate this” option to your pages, posts and custom posts. It will duplicate your selected page/post as a draft with all the content of the original page you were duplicating. This is a huge time saver! After installation and activation, hover on a page/post like you would normally do and get this new shiny option:

![duplicate this screenshot](https://yossiabramov.com/images/posts/recommended-wordpress-plugins/1.png)

👉 [get the plugin here](https://wordpress.org/plugins/duplicate-page)

### Custom Post Type UI (CPT UI)

CPT UI gives you super-powers! Instead of painstakingly registering and defining custom post types in your  `functions.php`  or  `your_other_functions.php`, CPT UI gives you a straight forward easy to use UI for creating custom post types. It will take you about 10 seconds to create your first post type - you literally need to fill only 3 required fields and you are good to go ✊. From there, you can easily integrate custom posts with the WordPress API and much more ✌.

👉 [get the plugin here](https://wordpress.org/plugins/custom-post-type-ui)

### Simple Custom Post Order

Let’s imagine the following scenario: you have a custom post type, say “Books”. Each one of your posts is a “Book” post. Now, you want to loop through the books, but have a specific order in mind… With **Simple Custom Post Order** you can drag and drop your pages, posts and custom posts to reorder them regardless of the way WordPress orders them. This make reordering your content incredibly simple.

After installation and activation, go to the plugin’s settings screen and choose the content types you want to reorder:

![<strong>Simple Custom Post Order</strong> screenshot](https://yossiabramov.com/images/posts/recommended-wordpress-plugins/2.png)

Get your content in order! 👍

👉  [get the plugin here](https://wordpress.org/plugins/simple-custom-post-order)

### Post Type Switcher

Say you have a custom post type for “Books” and also have a simple page. Now, you want to take your simple page and convert it to a “Book” custom post type page. With  **Post Type Switcher**  you can easily convert your simple page to a “Book” page and vice versa.

After installation and activation, your simple page and post pages will have a nice little radio select box in the document settings:

![<strong>Post Type Switcher</strong> screenshot](https://yossiabramov.com/images/posts/recommended-wordpress-plugins/3.png)

👉 [get the plugin here](https://wordpress.org/plugins/post-type-switcher)

### Advanced Custom Fields (ACF)

If you need to add custom fields to your pages, posts or custom post types this plugin gives you a robust solution. Consider this next situation: You have single product pages and some of them contain a testimonials section. If a single product page does not have testimonials you need to display some kind of a feedback form. With ACF this is very simple.

Basically, you need 2 things to insert a custom field:

1) Field settings - name, type, quantity etc. :

![ACF screenshot](https://yossiabramov.com/images/posts/recommended-wordpress-plugins/4.png)

There are many options and settings to explore!

2) location rules – where do you want the field to be displayed

![ACF screenshot](https://yossiabramov.com/images/posts/recommended-wordpress-plugins/5.png)

And there you have it, all your single “Product” pages will now have this custom field:

![ACF screenshot](https://yossiabramov.com/images/posts/recommended-wordpress-plugins/6.png)

As I mentioned above, I usually work with the Wordpress API and thus tend to call these custom fields in the context of an API call. So, if you need to call a custom field from a function, here is a quick example:

```php
<?php​​​​​​​
// Get all products​​​​​​​
function get_products( $data ) {

    // Get all posts where post_type = products
    $posts = get_posts([
        'post_type' => 'products'
    ]);
    
    if ( empty( $posts ) ) {
        return null;
    }
    // Map through all posts and add testimonials field    
    $posts = array_map(function($post){
        $post->testimonials = get_post_meta($post->ID, 'testimonials', true);
        return $post;
    }, $posts);
    return $posts;
}

// Register custom endpoint /wp-json/sample-api/v1/product
add_action( 'rest_api_init', function () {
    register_rest_route( 'sample-api/v1', '/product/', array(
      'methods' => 'GET',
      'callback' => 'get_products',
    ) );
} );
```

👉  [get the plugin here](https://wordpress.org/plugins/advanced-custom-fields)

I Hope you've found these plugins helpful and useful like I do! And, if you are unfamiliar with the WordPress API, start exploring it – you won’t regret it.

✍ For more posts:
[https://yossiabramov.com/](https://yossiabramov.com/)