• Hi.

    When I post a new post on my blog the whole posts gets displayed.

    How do I change it so It just showes a few lines, and you have to click on the post to read all the text?

Viewing 8 replies - 1 through 8 (of 8 total)
  • <?php the_excerpt(); ?>

    Displays the first 20 words unless you add your own excerpt, which is an option when you go to post.

    Add it instead of whatever you have. WHich is probable the_content or something like that.

    <?php rss_feed_20(); ?>

    Displays the first 20 words

    Thread Starter sunsi55

    (@sunsi55)

    Thanks ??

    Where do I find it?

    It will vary by theme, and depend on whether you are using index.php or a Page (page.php) as your homepage.

    You will find those in Admin > Appearance > Editor, listed on the right.

    You may need to learn more about the WordPress Loop to find it; here’s the basic info: https://codex.www.ads-software.com/The_Loop.

    Good luck!

    Thread Starter sunsi55

    (@sunsi55)

    I have been looking in Admin>Apperance>Editor
    UNder both index.php and page.php,
    but I cant find anything named named : <?php the_excerpt(); ?>
    As I understood I was going to replace <?php the_excerpt(); ?>with <?php rss_feed_20(); ?>? am i right?

    Thread Starter sunsi55

    (@sunsi55)

    This is how my the_contet looks like:

    <div id="content">
    	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    	<div class="line"></div>
    	<h1><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>
    	<div id="data"><span style="font-size:10px;">POSTED BY</span> <span style="font-size:13px; font-weight:bold"><?php the_author_posts_link(); ?></

    it sounds like you want to replace <?php the_content(); ?> with <?php the_excerpt(); ?>

    Alternatively, you could keep it as <?php the_content(); ?> and then use the “more” tag which is next to the hyperlink button when you edit your post

    Thread Starter sunsi55

    (@sunsi55)

    I just want to do So my post just showes a few line of the post, not the whole post, as I said in the first post ??

    I dont know to much about coding in wordpress, so the easiest way would be best for me ??
    I cant find the “more” tag….
    I went to post -> clicked on my post-> edit.. And I cant find any “more” tag.. Where did I go wrong?

    Thread Starter sunsi55

    (@sunsi55)

    I found it now! ?? Thanks for the help!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to just show a few lines of my post’ is closed to new replies.