• I thought I would try posting this in here – maybe more coders read this section – i don’t know – but it’s worth a try.

    I’m doing some final tweaking on my site. Having a hard time figuring this one out as well.

    How do I eliminate the
    tag between the post content text and the more tag ?

    From this display setup:

    Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    more ??

    To this setup:

    Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. more ??

    Thanks

Viewing 13 replies - 1 through 13 (of 13 total)
  • What version of WP are you using? I’m using the latest CVS and it works for me.

    Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. <!--more-->Equal blame, toil and pain, etc.

    or for a new paragraph:

    Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. <!--more-->

    Equal blame, toil and pain, etc.

    Thread Starter rvblog

    (@rvblog)

    I’m using “wordpress-2005-02-02”.

    Sorry, I thought my question was clear by the visual example that I used, but I guess it was not.

    I want the word “more” to be displayed immediately after the last word in the post – and not displayed on the next line underneath the post.

    Somewhere , one of the wordpress files places a <br /> after the last word in the post and before the <a> tag that holds the more feature putting the word “more” on the next line under the post.

    Example of my source code:


    <div class="postcontent">
    <p>Testing the inclusion of images in a post:<br />
    <a href="https://www.rvadventure.ca/archives/
    2004/12/22/test/#more-5">more &raquo;</a>
    </p>
    </div>

    Notice the <br /> tag ? – It is not in the theme’s index.php file. Some other file puts it there – And I’m trying to figure out how to prevent the file from placing it there so that the word “more” appears on the same line after the word “post:” in the above example.

    What exactly are you typing into the textbox when you write your post?

    Thread Starter rvblog

    (@rvblog)

    I just figured it out.

    A plugin called moremoose is causing the problem .

    Thanks anyways

    Neat plugin (I’d never seen it before). The positioning of the link worked fine for me, but I had to alter the plugin.

    When writing your post:

    The first bit of text goes before the tag and the tag goes on the same line.<!–more–>
    The rest of the text goes on a new line directly below.

    In the plugin:

    change
    $regex = "/()(.+)(()(s*<a id="more-[d]+"></a>)()s*)/s";
    to
    $regex = "/()(.+)((s*<a id="more-[d]+"></a>)()s*)/s";

    Anyway, as long as your happy :)

    Thread Starter rvblog

    (@rvblog)

    Yes, it is a neat plugin.

    And, thanks for your help – that did the trick.

    Now and can continue using the plugin and get the positioning that I want.

    I appreciate the help mdawaffe

    Thread Starter rvblog

    (@rvblog)

    @mdawaffe:

    I tried the fix above after a “refresh” and it did not work.

    So I played around with the code a bit using your suggested thought process and came up with this fix:

    The original plugin code showed this:

    $regex = "/(<p>)(.+)((<br />)(s*<a id=\"more-[d]+\"></a>)(<br />)s*)/s";

    I changed it to this:

    $regex = "/(<p>)(.+)(()(s*<a id=\"more-[d]+\"></a>)()s*)/s";

    and it works just fine now.

    Thanks for leading me in the right direction.

    Hm – it looks like some of my code did not display properly. <br />‘s are missing. I’ll have to remember to be sneakier when I post code with those in it. Plus, I think our setups might be slightly different.

    I’m glad you got it to work out in spite of me :)

    I always put <!--more--> in its own paragraph to keep things clean, and that’s what I’d recommend.

    As do I. If you want the more link to be within the final <p> though (or to look like it), the <!–more–> tag either needs to be on the same line, or you need some regex filter as above (preferably one a bit more robust). Really, it’d be best to do this with CSS, but I don’t know how to style the last p inline. Isn’t there a :last-element or something? I think it’s CSS2 or 3, though.

    Or is there a better way to achieve the “inline style” rvblog is looking for?

    One (manual) way is to place your own <p> element around the last paragraph of each post, defining a class for it (say last-p) that uses display:inline; as a property. I’m not sure this is necessarily “better”.

    Thread Starter rvblog

    (@rvblog)

    @allusion:

    The purpose of my post was to find a way to “not” put it in its own paragraph.

    My wanting the word “more” on the same line as the last word in the post is mainly for aesthetic reasons. I like the that look. ( it also tightens up the text on my front page a bit as well – eliminates some whitespace)

    As far as using CSS only, I’m not sure how I would get wordpress to add a separate style class or id to the word “more” or the last paragraph.

    I’m also trying to stay inside the theme files as much as I can and not amend other wordpress program files to avoid getting all screwed up and missing or forgetting to change something during future updates.

    Folks,

    I’d like to achieve exactly this, using the WYSIWYG editor… but the “more” link keeps appearing on it’s own line (it’s being added inside tags from the looks of things)

    So, the desired end result is:

    Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt. [More...]
    {new parapraph}
    Equal blame, toil and pain, etc.

    But I keep ending up with:

    Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt.
    {new parapraph}
    [More...]
    Equal blame, toil and pain, etc.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘<!–more–> tag position’ is closed to new replies.