• Resolved syzygist

    (@syzygist)


    Is there a way to remove the automatic line breaks that are inserted above the “read more” tag in a blog post? I would like the tag to be on the same line as the previous text (in other words, in mid-paragraph, so that clicking it brings the rest of the paragraph into view.

    The automatic blank line between the previous text and the read more tag makes it harder for my readers to find, as it places it resting on top of the social media icons instead of a continuation of the post text.

    I tried `.read-more-container {
    margin-top: 0px;
    }’

    in my custom css plugin, but that didn’t do the trick.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Theme Author Tom

    (@edge22)

    Hi there,

    This topic may be helpful: https://generatepress.com/forums/topic/display-read-more-inline/

    Let me know ??

    Thread Starter syzygist

    (@syzygist)

    I was initially daunted by the php part of the edit, but using your simple php plugin to implement it turned out to be much easier than I expected.

    This solution not only put the “Read more” tag inline as I wanted it, it allowed me to customize the tag itself, which was great.

    MANY thanks for going to all that trouble to make php tweaking accessible to people who don’t know php! As ever, you are a stellar model of the WordPress spirit ??

    BTW, the update to WordPress version 4.4.2 was released while I was dilly-dallying, and I’ve installed it, so this solution also works on 4.4.2.

    Theme Author Tom

    (@edge22)

    You’re very welcome! I’m glad I was able to help out ??

    Thread Starter syzygist

    (@syzygist)

    I do have one more question. Is it possible to remove the two nbsps before the more tag? They are causing it to indent slightly when I put it on a new line. It also looks a little funny inline, when there is only a single space after all of my other periods. I would rather have no spacing built in to the tag, and just manually add however many is appropriate to the situation. I tried removing one of the two underscores before the tag in the php, but that just caused it to disappear altogether.

    Theme Author Tom

    (@edge22)

    Interesting – I don’t see anything that would be adding two spaces. Are these spaces before the read more link?

    Thread Starter syzygist

    (@syzygist)

    Yes, the two spaces are before the read more tag, as on this page, where they cause an indent on a new line on the first post, and double spacing after a period when used inline on the second post.

    I switched to Twenty Twelve, and the two spaces do seem to be theme-related. In Twenty Twelve, the tag was flush left on a new line, and had only the manually inserted single nbsp after the period when inserted inline.

    Theme Author Tom

    (@edge22)

    Looks like that spacing is being added by some custom CSS:

    .content-read-more:before {
    	display: inline;
    	margin-left: 10px;
    }

    If you remove that it should be good to go ??

    Thread Starter syzygist

    (@syzygist)

    Doh! That’s what I get for pasting code without even reading it. That was the custom CSS as pasted from the thread you sent me the link to, BTW. If you send that link often, you may want to edit out the ‘margin-left: 10px;’ line. Thanks again – all good now ??

    Theme Author Tom

    (@edge22)

    Thanks for letting me know! I just added clarification to the topic ??

    Thread Starter syzygist

    (@syzygist)

    Oh, OK – so the only purpose of the css was to add the indent, and I can delete it entirely and rely on the php alone if I don’t want that?

    Theme Author Tom

    (@edge22)

    That’s correct ??

    Thread Starter syzygist

    (@syzygist)

    Got it. Guess the “before” in the selector should have clued me in to that. Thanks!

    Theme Author Tom

    (@edge22)

    Happy to help ??

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Remove line break above read more’ is closed to new replies.