GAZETTE Adding Custom Info at Start of Post
-
Using Gazette theme.
I like on http://www.markmanson.net, where he shows at the top of his post how long it will take to read.
How could I add something like that, other than making it in the text of the message? Is there a fun something I could put in the CSS stylesheet?
The blog I need help with is: (visible only to logged in users)
-
Hi Robert,
Although there isn’t a built in option to achieve what you’re after with this theme, you could use some custom CSS to manually add the length of time a post will take to read at the top of each post.
The following snippet would add “3 minute read” in the header section of your “Preparing for Stronger Regulations” post:
.postid-426 .entry-hero .entry-meta:after { content: "3 minute read"; display: block; }Edit “3 minute read” to your liking.
You can also use the above snippet as a template and edit .postid-426
depending on the post you’d like to add the reading time to. You can find a post’s ID by navigating to its editor and then looking for the numerical value in a URL.For example, the following is the link to the editor for “Preparing for Stronger Regulations” and you can see that “426” (the post’s ID) is in the URL:
https://wordpress.com/post/b-spoke.net/426
Let me know if that helps out or if you have any extra questions.
-
That’s interesting.
To confirm, I would need to add those lines in the CSS editor for
- every
post, as I added it.
Sounds complexly cumbersome!
But if I did go that route, could I add it below the title in the header block?
-
Hi Robert,
That’s right, you’d need to add different CSS for every post on your site. There isn’t a built in setting to add extra text to your post’s header area.
To add text below the post title, the snippet I originally gave would need to be tweaked slightly to the following:
.postid-426 .entry-hero .entry-title:after { content: "3 minute read"; display: block; font-size: 13px; font-weight: normal; text-transform: uppercase; }It’s worth noting that although none of our free themes display a post’s reading time by default, some of our Premium themes do. I’ve listed these out here, in case you wish to consider purchasing one:
Thanks!
- The topic ‘GAZETTE Adding Custom Info at Start of Post’ is closed to new replies.