To center a featured image in WordPress without using a plugin, you can make use of CSS (Cascading Style Sheets) within your theme's stylesheet or through the use of custom CSS code.
Here are the steps to follow:
1. Login to your WordPress admin dashboard.
2. Go to "Appearance" and click on "Editor" in the sidebar menu.
3. Look for the "style.css" file on the right-hand side of the editor.
4. Click on it to open the file and add the following CSS code:
```
.featured-image {
display: block;
margin-left: auto;
margin-right: auto;
}
```
Explanation of the code:
- The `.featured-image` class targets the featured image specifically.
- `display: block;` ensures that the image is treated as a block element.
- `margin-left: auto;` and `margin-right: auto;` set the left and right margins to auto, which horizontally centers the image.
5. Once you've added the code, click on the "Update File" button to save your changes.
6. Now, when you view a post or page with a featured image, it should be centered on the page.
Remember to check your website after making any changes to ensure that it appears as expected. If you encounter any issues, revert the changes or seek help from a developer or support forum.