Different Uses of the ‘more’ tags

2008-10-21 posted in Wordpress and Blogging Tips

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

Like this post? Please help share it via the following social sites. Your share keep us creating more useful posts.

You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.
4 Responses
  1. Tom Aquinas says:

    Thx for the tip! Good info!

  2. Mawh says:

    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. Miriam Evers says:

    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

Support Forum

I no longer offer theme support in the comment section. If you are having any Wordpress theme related issues, please go to the Forum for support.
All support related questions posted here will be deleted without notice.

Leave a Reply


* If you are having any Wordpress theme related issues, please go to the Forum for support.