Different Uses of the ‘more’ tags

Posted by on Oct 21, 2008 in Wordpress and Blogging Tips | 4 comments

With the more tag, your posts will be splited. The excerpts will be displayed on the home and/or the archive page. The full article will be shown in the post itself.

There are a few ways to use the more tag.

Method #1

A link showing “more…” is placed at the bottom of the post where you insert this code in the HTML mode:
<!--more-->

Eg, one full article has 3 sentences as follows:

Hi, this is my first post. I have many things to write about myself. I live in a wonderful city of Angels.

To display only the first 2 sentences in the home or the archive page, you add this more tag in the HTML mode of the post:

Hi, this is my first post. I have many things to write about myself.

<!--more-->

I live in a wonderful city of Angels.

In the home or archive page, the post will be displayed like this:

Hi, this is my first post. I have many things to write about myself.

more…

Note: The link “more…” is defined in this coding: the_content(“more…”); which can normally be found in index.php, search.php or archive.php

Method #2

Instead of displaying more… at the bottom of the post, you can hide it by entering a space between ‘e’ and ‘-‘

<!--more -->

Taking the same example as above, you add this more tag in the HTML mode as follows:

Hi, this is my first post. I have many things to write about myself.

<!--more -->

I live in a wonderful city of Angels.

In the home or archive page, the post will be displayed like this:

Hi, this is my first post. I have many things to write about myself.

Method #3

You can customize the more… link to anything you want to write.

For example, you want to replace “more…” with “Click here to view the full story”. To do this, you add this more tag in the HTML mode as follows:

Hi, this is my first post. I have many things to write about myself.

<!--more  Click here to view the full story -->

I live in a wonderful city of Angels.

In the home or archive page, the post will be displayed like this:

Hi, this is my first post. I have many things to write about myself.

Click here to view the full story

Author
This article is originally written by Brian L. You are free to redistribute this article but please link back to this page with this title: Different uses of the more tag

4 Comments

  1. Thx for the tip! Good info!

  2. Yep, great! Thanks! :]

  3. This is the first article I have seen written by you, however it is a very good tutorial. Also I am happy to see that you allow this information to be redistributed. Good job!

  4. Thanks for this well-written tip about the more tag Brian. I just put it to good use. I use Method 3 and put the name of the post in the link too like this: “continue reading Different Uses of the more tag”

    Miriam

Leave a Reply

Your email address will not be published. Required fields are marked *

Experience ThemeMask

View a mask:

Get the masks now!


Theme runs on
Elegantthemes Chameleon