• Hi All,

    I’m using the <!–more–> attribute in my posts and it’s causing the (more…) link that appears on the web page to appear on its own line.

    Is there any way to force this to appear at the end of the text on the same line?

    Thanks,

    Chris.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Post a URL of a page with this happening on it

    Thread Starter Herculez

    (@herculez)

    Hi

    In style.css stylesheet, in this section, line 97

    #main a.more-link {
      display:block;
      margin:10px 0 0;
    }

    change it to this

    #main a.more-link {
      display:inline;
      margin:0;
    }

    That puts the More on the next line with no space between the two lines. To get it on the same line – all of your more tags look like this

    <p><a href="tasteful_award.php">Winner</a> of the Cool Bananas Film Festival, this ad takes an ultra cool approach towards promoting Bananas.<br />
     <a class="more-link" href="https://www.zealouscreative.com/ads/a-tasteful-bunch/#more-1">(more…)</a></p>

    It’s the <br /> before the A tag that causes the line break. Check your template to see if the_content() is inserting a
    tag on a more. If so, remove the <br /> from the_content(). Hopefully you can and that resolves the issue.

    Thread Starter Herculez

    (@herculez)

    Hi stvwlf,

    Thanks for taking the time to reply. The CSS fixes appear straight forward however the second half of your post is a little more of a mystery.

    the_content() tag appears as follows:

    <p><?php the_content(); ?></p>

    No <BR /> tags in sight.

    Is there a master template that outlines how certain tags functions? Perhaps I can alter the <?php the_content(); ?> in there?

    Thread Starter Herculez

    (@herculez)

    Come to think of it, it appears to have less to do with the the_content() tag and more to do with the function of adding a <!–more–> break in the content.

    Unless there’s a place to change how this functions, I may be out of luck. Anyone? ??

    Hi

    I was just looking at the WP “more” code and testing this on a site of mine. There is nothing in core WP that is inserting that
    in the more tag.
    Go into your posts, look on the HTML tab where the more tag is, see if there is any <br /> before the more tag.

    If its not that, there is a WP filter called “the_content_more_link” that a theme developer can override to change default styling. This is applied when WP is creating the more link. Search your theme’s functions.php file, and also the template file and any other theme files that are included into the template file, to see if you find that phrase. Its possible it’s adding in a <br /> tag there.

    If none of that works I can get you a line of jQuery (javascript) that will strip out any break tag before the more link.

    Thread Starter Herculez

    (@herculez)

    Heya,

    I did a global search for “the_content_more_link” and it didn’t return any results.

    At this stage, I’ve grown accustomed to how it looks with your style fix above and think perhaps it may even be better to leave the ‘more’ on its own line (so they’re all consistent and don’t wrap onto different lines).

    So lets leave it at that, thanks for your help with this. It’s appreciated.

    Chris.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Stop the (more…) from wrapping onto a new line’ is closed to new replies.