Home › Forums › Weaver Xtreme Theme › Add Text to Post Only on Single Page View
- This topic has 2 replies, 2 voices, and was last updated 1 month ago by
mperry8304.
-
AuthorPosts
-
January 23, 2021 at 16:19 UTC - Views: 11 #67121
mperry8304
ParticipantI have a quotations website using Weaver Xtreme. The quotes are a type of custom post.
I would like to add some additional text to one of the quotes. I’d like this text to ONLY appear on the single page view and not change how the quote looks on the archive page. Ideally the text would be either before or after the featured image on the single page view.
Right now I’m using the pagecontentbottom custom field to add the text, but it’s appearing below the bottom meta information. (https://www.charlesdickensinfo.com/quotes/you-know-what-i-am/)
So far I’ve been unable to put the text where I’d like it without affecting the quote’s layout on the archive pages.
Is there a way to get the layout that I’d like?
January 23, 2021 at 17:51 UTC - Views: 9 #67123scrambler
ModeratorI am not really sure where you want the text in the page you linked to, but I can tell you how to hide it on Single post page so that could can simply add it in the post content wherever you like.
Do do that, add the HTML below wherever you want in your post content (using the TEXT view if using the classic editor, or an MTML block if using the block editor.
<div class="mytext">Type your text here</div>
Then just add the CSS rule below to your theme Global Custom CSS Rule box.
.mytext {display:none;}
.single .mytext {display:inline-block;}Once the principle works, we can work on more styling rules to fine tune the style of that content
January 23, 2021 at 18:09 UTC - Views: 7 #67124mperry8304
ParticipantOh my gosh! This works perfectly!! Thank you so much!
-
AuthorPosts
- You must be logged in to reply to this topic.