This method does not require adding any code to your WordPress theme, it is simple and recommended for most users.
First, you need to install and activate the Advanced WordPress Backgrounds plugin . For more details, see our step-by-step guide on how to install a WordPress plugin .
Once enabled, go to the Settings » AWB page in the WordPress dashboard. Here you can check the boxes for the browsers or devices on which you do not want to display the parallax effect.
For example, if you don't want to show the parallax effect for mobile users, you can check this box.
Then click the “Save Changes” button to save your settings.
Next, open a page or post of your choice in the Gutenberg block editor .
Then click the “+” button in the upper left corner of the screen to open the block menu.
From here you need to find the Background (AWB) block and add it to the post.
Add the AWB block
Now open the Blocks panel on the right list of turkey cell phone number side of the screen and go to the Image tab if you want to add an image as a parallax background.
Then click the "Select Image" button to launch the media library. You can also click the "Use Featured Image" button to automatically add the highlighted image as the background.
Choose an image as the parallax background
You can even add a background color or video for the effect by switching to these tabs.
After adding an image, you can adjust the focus point in the Blocks panel and configure the background size, but we recommend setting the background size to “Cover”.
Disable the parallax effect on devices or browsers
-
- Posts: 661
- Joined: Sat Dec 21, 2024 5:45 am