---
title: "WordPress Page Transition Tutorial"
url: "https://wicky.co/wordpress-page-transition-tutorial/"
type: "post"
published: "2022-03-02T08:22:07-05:00"
modified: "2022-03-02T08:22:07-05:00"
author: "wicky"
---

In this video I will show you how I like to add page transitions to a WordPress website. This will be a more advanced tutorial as it will require custom coding. I won’t be using any page transition plugins as I find them very limiting when it comes to customization and performance.

The method I will be using is 100% CSS code so there won’t be any extra JavaScript bloat to your website.

Code Snippets Plugin:
[https://wordpress.org/plugins/code-snippets/](https://wordpress.org/plugins/code-snippets/)

**Timestamps:**

- 0:00 Introduction
- 1:50 Global Page Transitions
- 11:35 Target Certain Pages

## Global Page Transitions Code:

```

					add_action('wp_body_open', 'add_code_on_body_open');
function add_code_on_body_open() {
    if ( is_single() || is_page() || is_front_page() || is_home() ) {
        echo '

';
    }
}

```

## Target Certain Pages Code:

```

					if ( is_page( array('services','resources','contact','about','portfolio')) ) { // for specific page

```
