Home Experience & Tips Sharing Standard Post

Standard Post

How to Disable the Responsive Feature of a WordPress Theme

In recent years, due to the diversification of internet devices, most WordPress themes have adopted responsive layout design. However, there are always special website requirements that do not want a responsive layout. This article introduces the conventional method to disable responsive layout. Remember to back up the theme files before modifying them, and replace them back if errors occur.

Updated on November 1, 2019 About 2 minutes read
怎么禁用WordPress主题的响应式功能

In recent years, due to the diversification of internet devices, mostWordPress Themeshave adopted responsive layout design (responsive layout). However, there are always some special website requirements that do not want a responsive layout. This article introduces common methods to disable responsive layout.

Remember to back up theme files before modifying them; if errors occur, replace them back.

Methods to Disable Responsive Layout in WordPress Themes

First, in the WP admin panel, go to Appearance → Theme Editor, then select the theme header (header.php) in the right editing file section.

Find the following code and delete it.

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

device-width

Then modify the stylesheet (style.css) file, find code like the example below (@media screen and), and delete all of it.

@media screen and (max-width: 1210px)

media screen

After updating the file, check the frontend to see that the responsive layout should be gone.

It is worth noting that the CSS code file to modify may vary depending on the theme, so it needs to be analyzed on a case-by-case basis.

For more information on responsive layout, refer to:Baidu Baike

5/5 - (2 votes)
Previous SiteGround Data Center Change Tutorial_Which SiteGround Data Center is Best Continue reading content around the same timeline. Next SiteGround Refund Policy and Dissatisfaction Refund View the next related tutorial or experience.

AI Website Building Assistant

🤖
Hello! I am the Naibabiji AI Assistant. How can I help you?
Quick Consultation: