Share/Bookmark

Hack More to Earn More

On one of my sites, I use the <!–more–> quicktag to designate the "cut-off" point for my posts. I could use the_excerpt tag, but I don't like how the excerpts look. Unless you explicitly define the excerpt for each post, the_excerpt tag will just show the first 120 words of the post and the HTML tags are stripped from the excerpt. As a result, the excerpt can be confusing and look like crap. That's why I prefer to use the <!–more–> quicktag.

However, when readers click on the more link, they are shown the post starting from the cut-off point on down. That means they don't see the top part of the post unless they scroll up. It makes sense from a reader's point of view. Why see something you already read? However, from my point of view, it would be better to show the reader the page starting from the top. Keep in mind that I normally set the cut-off between the first and second paragraph. So I'm not forcing readers to re-read half the post. Just the first paragraph.

So what do I gain from all of this? Well, potentially more money. By showing the page from the top, readers can see my top Adsense ad. My top ads pay better than my bottom ads. When WordPress shows the post from the cut-off point down, readers don't see the top ad unless they scroll back up.

Now the tricky part, how do we get WordPress to display the page from the top on down? I looked around the WordPress Codex, but I could not find any parameters for the <!–more–> or the_content tags that would do the trick. So I had to hack one of the WordPress function (it's a simple hack). Follow the steps below if you want to change the behavior of WordPress.

Locate the file "template-functions-post.php" and make a back-up copy of the file. It's located in the "wp-includes" sub-folder where your WordPress files are installed.

Locate this line (it should be line 92 – the line wrap below is not intentional):

$output .= ' <a href="'. get_permalink() . "#more-$id\">$more_link_text</a>";

[Note: In WordPress 2.1, you will need to modify line #102 in a file called post-template.php]

$output .= ' <a href="'. get_permalink() . "\">$more_link_text</a>";

That's it. WordPress will now show the page starting with the top.

This entry was posted in How-to, WordPress. Bookmark the permalink.

9 Responses to Hack More to Earn More

  1. Mark Wegner says:

    Here's another tip related to the more link that allows you to add an SEO bonus of including the title of the target page in the link anchor text.

    In the theme template index.php replace the template tag:

    with:

    Now your more links will include have the link text be the title of the page and then " Page". Works like a charm!

    The "secret' is setting the $echo variable to false, otherwise the_title() function automatically echos and the title text is displayed at the beginning of the post instead as part of the more link anchor text.

    Enjoy!

    Mark

  2. Mark Wegner says:

    Here's another tip related to the more link that allows you to add an SEO bonus of including the title of the target page in the link anchor text.

    In the theme template index.php replace the template tag:

    " "

    with:
    ""

    (remove spaces between when pasting code)
    Now your more links will include have the link text be the title of the page and then " Page". Works like a charm!

    The "secret' is setting the $echo variable to false, otherwise the_title() function automatically echos and the title text is displayed at the beginning of the post instead as part of the more link anchor text.

    Enjoy!

    Mark

  3. Mark Wegner says:

    Here's another tip related to the more link that allows you to add an SEO bonus of including the title of the target page in the link anchor text.

    In the theme template index.php replace the template tag:

    php the_content(__('Read the rest of this entry »'));

    with:

    php the_content(the_title($before = ", $after = ' Page', $echo = false).' ');

    Now your more links will include have the link text be the title of the page and then " Page". Works like a charm!

    The "secret' is setting the $echo variable to false, otherwise the_title() function automatically echos and the title text is displayed at the beginning of the post instead as part of the more link anchor text.

    Enjoy!

    Mark

    PS Sorry about the multipost, my code was not being displayed. If this doesn't work, I'll just email it to you.

  4. Pingback: Mejorar el anchor text en Wordpress » paranovatos.com

  5. Pingback: Upgrading to WordPress 2.1 Tip

  6. spanish says:

    I cannot find this file – "template-functions-post.php" – i know i may be being a bit dumb! – but where should it be???

  7. gerson vides says:

    Les agradesco atodos mis amigos del mundo les saludo de guatemala
    bueno esas cantidades de dinero se miran bonitas pero porque piden numero de tarjeta estos mentirosos creen que uno es bruto ellos los quieren robar el pisto porque esa empresa se esta derumbando de jaranas asi que amigos no cean nada de esto los quiero gracias

  8. sohbet says:

    Here's another tip related to the more link that allows you to add an SEO bonus of including the title of the target page in the link anchor text.

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

iZachy Newsletter

Don't have time to visit iZachy everyday? Then sign up for my free newsletter. I'll send you an email when I have something to share with you. Your email address will be kept confidential and I will not share, sell, or rent it to anyone. You can unsubscribe at any time by clicking a link in the email.

Enter your email address to sign up for my newsletter:
  

Or you can also sign up for our blog feed.