Home Forums Weaver Xtreme Theme Add Text to Post Only on Single Page View

Topic Resolution: Resolved
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #67121
    mperry8304
    Participant

    I 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?

    #67123
    scrambler
    Moderator

    I 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

    #67124
    mperry8304
    Participant

    Oh my gosh!  This works perfectly!!  Thank you so much!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.