You can easily modify your WordPress page width by editing the style.css file: Edit the style.css file and add .site-content { max-width: [your preferred width]; }. Edit [your preferred width] to set the page width. Save changes and clear cache (optional).
WordPress Page Width Modification Guide
WordPress default page width limits the flexibility of your website layout. The following guide will guide you through how to easily modify your page width to get a width that better suits your specific design.
Step 1: Edit CSS File
To modify the page width, you need to edit your WordPress theme’s style.css file. Go to your WordPress dashboard and navigate to Appearance > Theme Editor. In the right panel, select the "style.css" file.
Step 2: Add width settings
In the style.css file, add the following code snippet:
<code class="css">.site-content { max-width: 1200px; }</code>
Step 3: Modify Maximum width
In the code snippet, "1200px" represents the maximum width of the page. You can modify this to your preferred width if needed.
Step 4: Save changes
After editing the style.css file, click the Update File button. Your changes will take effect immediately.
Step 5: Clear cache (optional)
If you use a caching plugin or CDN, you may need to clear your cache to see your changes. This will ensure your page loads with the latest CSS files.
Note:
The above is the detailed content of How to change page width in wordpress. For more information, please follow other related articles on the PHP Chinese website!