• Resolved willemb2

    (@willemb2)


    I just created a selfhosted blog with the LeftSide theme: https://www.vrouwleentje.nl/

    I have not used the “more tag” in any post. Still all posts appear with a “read more” on the front page, even if there is nothing more in a post with 1 or 2 lines.

    Is this by design? Can I disable it? I like the exerpt function for long posts, but I prefer to control it myself.

    I’m running WordPress version 3.8.2 on Synology DSM 5.0

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter willemb2

    (@willemb2)

    I searched around a bit on www.remarpro.com but without any knowledge of PHP I don’t really know what I’m doing:

    If I replace <?php the_excerpt(); ?> by `<?php the_content(); ?> in index.php the full post appears on th efront page, but the “read more” links remain.

    Theme Author Guido

    (@guido07111975)

    Hi,

    The read more is hardcoded, so you will see it always.
    You can remove it from the theme. Open file index and remove:

    <div class="more">
    	<a class="readmore" href="<?php the_permalink() ?>" rel="bookmark"><?php _e( 'Read More &raquo;', 'leftside' ); ?></a>
    </div>

    Guido

    Thread Starter willemb2

    (@willemb2)

    Thank you, Guido, that works.
    with <?php the_content(); ?>
    I get the default link (more…) now if I use the more tag in a post.

    I tried to please your translation file by using
    <?php the_content('Read More &raquo;'); ?>
    but that does not work, it keeps appearing as “Read More ?” if I set the language to Dutch (nl-NL).
    Willem

    Thread Starter willemb2

    (@willemb2)

    Hmm, I did use backticks, but my code lines are not formatted as such.

    Theme Author Guido

    (@guido07111975)

    I do not fully understand you…

    You have removed the read more code from file index?

    When you enter text on a page/post and insert a read more from the default text formatting bar, it should display in your own language (Dutch?) BUT only if your WordPress install is Dutch too!

    Guido

    Thread Starter willemb2

    (@willemb2)

    Hi Guido, it is not an important issue at all. I just came across an article about “Child Themes”. I did not know something like that existed. I’ll read more about that first and will stop messing with your theme. But I’ll tell you what I did untill now:

    I removed the hard coded read more div from index.php as you suggested. I had already learned from the “Customizing the Read More” article in the Codex that <?php the_excerpt(); ?> was cutting off posts to 55 words on the front page, so I changed that into:
    <?php the_content(); ?>.
    Now I had the behavior I am used to in other WordPress sites: full posts on the front page unless I insert a <!–more–> in a post. If I do, I get an excerpt on the front page that ends with a link “(more…)” independent of the language setting (Dashboard > Settings > Language). I have set it to Dutch (nl-NL) and this makes both the WordPress interface and your theme talk Dutch to me. I had already been in your nl-NL.po and abused it to translate “Navigation” to “Inhoud”. I noticed that there is no (more…) in it, but that Read More &raquo; translates to Lees Meer &raquo;, so I changed <?php the_content(); ?> into `<?php the_content(‘Read More »’); ?>
    `. But apparently that is not the way it works.

    Theme Author Guido

    (@guido07111975)

    No, that’s not the way to add a read more.

    So you do not want a read more in every post?

    When you create a page/post you can add a read more via the text formatting bar that’s located above the text input field. It’s a button.
    This ‘more’ button is only visible when you click tab ‘tekst’ (Dutch) in the same text formatting bar (on right side).

    Maybe you should contact me in Dutch via my website guidovanderleest.nl

    Guido

    EDIT: I notice the read more using the button does not work (text is cut off but without Read More link)… I will try to find out why.

    Theme Author Guido

    (@guido07111975)

    If you don’t want a Read More button in each post, try this:

    <?php the_content(__('Read More ?', 'leftside' )); ?>

    (this way the read more is translatable, like the rest of the theme).

    So remove the read more code and the excerpt from file index (= frontpage) and from file archive (= archive pages). And use the ‘more’ button in your text otherwise the Read More is not displayed.

    Guido

    Theme Author Guido

    (@guido07111975)

    Closing this because of no replies.

    Guido

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘"read more" links on frontpage even without more tag’ is closed to new replies.