Ask Your Question
0

How can I assign a class to the main div of a specific page on Wordpress?

asked 2023-06-28 08:02:28 +0000

plato gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-06-28 08:26:02 +0000

pufferfish gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-28 08:02:28 +0000

Seen: 12 times

Last updated: Jun 28 '23