Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To assign a class to the main div of a specific page on WordPress, follow these steps:

  1. Log in to your WordPress dashboard and navigate to the "Pages" section.

  2. Select the page you want to assign a class to and click on "Edit" to open the page editor.

  3. In the editor, switch to the "Text" tab and locate the

    tag that wraps the main content of the page.

  4. Add the class attribute to the

    tag, like this:
    . Replace "your-class-name" with the desired class name.

  5. Save the changes to the page and view the page on the front-end to confirm that the class has been applied to the main div.

Note: If you are using a page builder plugin or a custom theme, the process of assigning a class to the main div may be different. Check the documentation of your page builder or theme for specific instructions.