I need to do hanging indents for a reference page done in APA style. How do I do this? I am using the Pure & Simple theme.
Hi Cary,
As you've no doubt discovered by now, there is no method in WordPress for creating hanging indents. To add hanging indents, you'll need to edit the underlying CSS (Cascading Style Sheet) that determines the look and layout of objects on your site.
The CSS will be something like this, though you can adjust the values to your needs:
style="margin-left:.5in; text-indent:-.5in"
But, the tricky bit is where to apply that CSS. This varies, depending on the theme you're using.
You said you're using the Pure & Simple theme. In that theme (and many others), the paragraphs on both pages and posts are wrapped in a section with the class of: .entry-content
So, you could go to: Appearance > Customize > Additional CSS and add the following:
.entry-content p { margin-left:.5in; text-indent:-.5in }
When you save your changes, that would apply a hanging indent to every single paragraph on every page or post on your site. That's not what you want. You probably want to only apply the hanging indent to certain paragraphs, or only on that one page.
To apply the CSS to only that one page, open the page in your browser and right-click, then select “Inspect Element” (or whatever your browser calls this function). That will open the underlying source code for the page.
Near the top, just underneath the <head></head>
section, look for the <body class="page-id-1234">
, where “1234” represents the unique page ID for that particular page.
With that variable, we can return to: Appearance > Customize > Additional CSS and add something like the following:
.page-id-1234 .entry-content p { margin-left:.5in; text-indent:-.5in }
That code will only affect paragraphs within the .entry-content
section, and only on the page with the ID of: 1234
But what if you only want to apply the hanging indent to individual paragraphs?
In that case, instead of the CSS above, you can create a new, custom class like the following:
.hanging-indent { margin-left:.5in; text-indent:-.5in }
Be sure to save your changes.
Then, when you're creating a page or post, you can apply that special class to just the paragraph(s) you choose. In the Block Editor (Gutenberg), you'll first type your paragraph content. Then, in the Tools on the right-hand side, under the “Advanced” section, you'll find a field in which you can enter “Additional CSS class(es)”.
In that field, enter: hanging-indent
(Or whatever name you chose for your custom class.)
Then, your custom CSS styling will be applied to that paragraph. Repeat this process for any additional paragraphs to which you wish to apply your custom, hanging-indent style.
Whew. That's a lot to take in.
I hope this helps!