WordPress – Page 2

Sync Posts and Pages from Staging to Live Site

We all know about the export and import thing – when you move from staging to live the entire site at once. But from time to time I keep getting requests from clients about syncing only specific posts or pages (or custom post types – doesn’t matter).

In this guide, I am going to talk about two ways how we can achieve that – programmatically from scratch and with a WordPress plugin.

Create a Custom Post Type Filter by Taxonomy

In this tutorial, we’re going to create two different custom post type filters by custom taxonomy; the first one will be on site pages with posts (CPT archive pages):

WordPress custom post type filter by taxonomy example
Example of a custom post type filter by taxonomy in a default Twenty Twenty-Four theme.

The second one –  in the WordPress admin, in the post list:

custom post type filter by a taxonomy in the WordPress admin post list

After that, we will also dive deep into the whole theory thing.

How to Move WordPress Media Library to a New Site

In this tutorial, I am going to discuss different ways of moving the WordPress media library to a new site – both for multisite installations and standalone WordPress sites.

How to Copy an Elementor Page from One Site to Another

Recently, I’ve been doing a lot of work with Elementor, specifically, developing integrations with my plugins, mostly because I receive many requests from my customers. Personally, I prefer using the Block Editor on my projects, but Elementor is the most popular page builder after all. Since it is used on a huge number of WordPress websites, my goal is to make my plugins work flawlessly with it.

In this step-by-step guide, I’d like to show you two ways of copying a page created with Elementor to another site:

  1. Using a crossposting plugin (we will use the Simple WP Crossposting plugin),
  2. Programmatically (in this method, we will do it with the WordPress REST API).

There is also a third, partial way, which comes down to exporting and importing your Elementor templates. It doesn’t require any knowledge, and you can learn to do it either intuitively or just by watching a random video on YouTube.

Now, let’s jump straight into our two methods.

How to Fix WP Cron

Since a lot of my plugins rely on WP Cron, I decided that it is time to publish a complete guide about it, or, to be more specific, a complete guide on how to fix it if it is not working.

For example, if you read my article about order lifecycle hooks, it will be crystal clear to you that it is impossible to sync orders correctly in my order sync plugin without WP Cron (or Action Scheduler – which is usually used when WooCommerce installed).

Ok, let’s dive into it.

Copy Pages Between Sites in Multisite Network

Let me show you an easy way to duplicate WordPress pages between any of your sites within a multisite network.

Or to be more specific, I am about to show you two ways how you can do that:

Either way, by the end of this tutorial, we will have brand-new bulk actions on the “All Pages” admin page. However, each page can also be copied individually to a specific sub-site in case you decide to go for the plugin approach.

Copy Pages between Sites within WordPress Multisite network
As you can see, in this screenshot, it says “Move to…” instead of “Copy to…”. You can choose what suits you best, but if you want to move a page to another multisite site and remove the original one, it can be achieved with just one extra line of code.

AJAX Filter Posts by Category with Pagination

In this tutorial we’re going to learn how to create an AJAX pagination (without page refresh) on your WordPress website and also how to make it work together with AJAX filters (if you have one of course).

As a result of this tutorial, we’re going to have something like this:

WordPress AJAX filter posts by category with pagination

On the screenshot, you can see that we’re going to use page numbers links as a pagination, but using the same approach, you can easily make it with a load more button.