Forums

Posting Summary on front page (7 posts)

  1. Abominable
    Member
    Posted 1 year ago #

    Greetings,
    Is there a plugin that will allow me to show a summary of my blogpost on the front page, then when you click to the actual blog post page that summary is now bolded.
    I understand there is the <!--more--> feature, but that does not allow that summary text to have different decoration or styles. <!--more--> also brings the reader to a new point in the post.
    torrentfreak.com would be an example of what I am trying to do exactly.
    Regards.

  2. moshu
    Member
    Posted 1 year ago #

    It is easy.
    Steps:
    1. Replace the_content in your index.php of the theme with the_excerpt.
    2. IMPORTANT: Always put some text (what you want to show on the main page) in the "Optional Excerpt" field when you write the post!!!
    3. In your single.php template file find the Loop and before the_content line insert this:
    <strong><?php the_excerpt(); ?></strong>
    Meaning you will have both the_excerpt AND the_content in your single.php file.

    It should work.

  3. Abominable
    Member
    Posted 1 year ago #

    Thanks for the reply moshu.
    Unfortunately I am using the K2 theme which has re-written the single.php and loop page.

    Now the single page just asks for the loop template when displaying

    (this is the single page)
    <div id="current-content" class="hfeed">

    <?php include (TEMPLATEPATH . '/theloop.php'); ?>

    <?php if (!defined('K2_NOT_FOUND')) { comments_template(); } ?>

    </div>

  4. moshu
    Member
    Posted 1 year ago #

    Then you are out of luck.

  5. Abominable
    Member
    Posted 1 year ago #

    Actually I'm not. Since my single.php page uses my loop page I just had to edit the loop to display each section of post based on what page I was on

    see this pastbin link - http://pastebin.com/f7b89ffc0

    Now on my front page I have the excerpt (not bold) and then on the single page I have the excerpt bold and then the rest of the post (which is the body)

    Thanks for the help moshu

  6. jbottero
    Member
    Posted 1 year ago #

    OK, in my default theme, I've opened the index.php file and found this:

    the_content('Read the rest of this entry &raquo;');

    and replaced it with this:

    the_excerpt('Read the rest of this entry &raquo;');

    And, in my single.php file, I've found

    <?php the_content('<p class="serif">Read the rest of this entry &raquo;</p>'); ?>

    and just before it added this

    <strong><?php the_excerpt(); ?></strong>

    But there is no change at all.

    What am I doing wrong?

  7. tommybernadus
    Member
    Posted 1 year ago #

    put summarry text under your post under the form post

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.