Archived topic
Customisation of Blog page post
6 replies · Started by Tania on November 2, 2020
H2 headline as the introduction to your post. Lorem ipsum dolor sit amet consectetur adipiscing elit, urna
I have copied this from blog page sample site SERVICE, which I am customising.
I want to get rid of my post title which is not editable because the sample excerpt is starting with this command.
That is not editable. I can't delete it. I need to get rid of this post title at the beginning of the excerpt (paragraph).
How could I get rid of this line?
Hi there,
Sorry not sure if I fully understand.
Can you link me to the page in question and let me know what you are trying to remove?
Let me know :)
https://www.smartchampstuition.co.uk/blog/
10 Tips For Home Schooling .......I want to remove this from the beginning of the paragraph.
Thanks a lot.
bumping
Hi there,
the issue with adding the Title to the post content using a heading block is that it becomes part of the content. Instead you can remove that from the content. Then you can use a Hook Element to add this:
<span class="content-title"><?php single_post_title(); ?></span>
to the generate_before_content hook
Check execute PHP
And set the Display Rules to Single Post
Then you can add this CSS:
.content-title {
display: block;
text-align: center;
color: #ad187e;
margin-bottom: 20px;
font-family: "Oxygen", sans-serif;
font-weight: 700;
text-transform: uppercase;
font-size: 30px;
line-height: 1.3em;
}
Using this method will also remove the duplicate H1 that you have on the page.
Thanks a lot. Where shall I add the CSS? in same box where I have added php hook box....under this: <span class="content-title"><?php single_post_title(); ?></span>
Or shall I add the CSS in the Additional CSS for the website through the customiser?
Thanks a lot. Where shall I add the CSS? in same box where I have added php hook box….under this: <span class=”content-title”><?php single_post_title(); ?></span>
Or shall I add the CSS in the Additional CSS for the website through the customiser?
Yes, you should add the CSS on the Additional CSS on the Customizer.
Here's how to add CSS - https://docs.generatepress.com/article/adding-css/