b2evolution b2evolution

  • Sign in
  • Sign up
  • About
  • Downloads
  • Hosting
  • Docs
  • Support
  • Sign in
  • Sign up
  • Manuals Home
  • Latest Updates
 
  1. b2evolution CMS User Manual
  2. Developer Reference
  3. How to... (Customize)
  4. How to change the "Read More" link

How to change the "Read More" link

Look in _main.php (in the directory of your choosen skin) for

 <?php $Item->Content(); ?>

this gives a result like:

=>Read more

Change it to

<?php $Item->content( '#', '#', 'Read More', '' ); ?>

for a result like this:

Read more

Change it to

<?php $Item->content( '#', '#', 'Read More', 'This is the rest of the post' ); ?>

for a result like this on the first page:

Read more

and this on the permalink page:

first part of post‘

This is the rest of the post

the rest of the post

Or change it to

<?php $Item->content('#','#',$Item->get('title'),'','<p>Read full text of ','...</p>','htmlbody',10); ?>

for a result like this:

Read full text of -this is the title of the post-

More technical info if you want to dig into it, you can find on http://doc.b2evolution.net/v-1-9/evocore/Item.html#methodcontent.


 function content(
 		$disppage = '#',
 		$dispmore = '#',
 		$more_link_text = '#',
 		$more_anchor = '#',
 		$before_more = '#',
 		$after_more = '#',
 		$format = 'htmlbody',
 		$cut = 0,
 		$stripteaser = false,
 		$more_file = ''
 		)
 @param mixed page number to display specific page, # for url parameter 
 @param mixed true to display 'more' text, false not to display, # for url parameter 
 @param string text to display as the more link 
 @param string text to display as the more anchor (once the more link has been clicked) 
 @param string string to display before more link/anchor 
 @param string string to display after more link/anchor 
 @param string Output format, see {@link format_to_output()} 
 @param integer max number of words 
 @param boolean true if you don't want to repeat teaser after more link was pressed 
 @param string filename to use to display more
Created by topanga • Last edit by fplanque on 2020-06-09 00:24 • •

Search the Manual

Content Hierarchy

  • b2evolution CMS User Manual
  • User's Guide
  • Installation / Upgrade
  • Front-office Reference
  • Back-office Reference
  • Developer Reference
    • Website Skins/Themes
    • Email Skins/Themes
    • b2evolution Files
    • Website Integration
    • Plugins
    • Debugging
    • Technical Reference
    • Hacks
    • Credits
    • Development
    • How to... (Customize)
      • How to upgrade a b2evo blog template to an evoSkin
      • Popup Comments
      • FTP 101: How to upload and manage files on your web server
      • Working with the Open Graph Protocol
      • How to - Use "honeypots" in your forms
      • I made a change but my blog is not updated
      • Turn A Skin Into A Template
      • Where is the Templates Tab?
      • Display Recent Posts In The Sidebar
      • Recent Comments In The Sidebar
      • Include Item Feedback
      • How to display comments, trackbacks and pingbacks UNMIXED
      • Change the way my blog looks
      • How to use b2evolution as a CMS
      • How to Show the Assigned Author of a post
      • How to change the "Read More" link
      • How to call a blog through xyz.php instead of index.php?blog=x
      • How to turn a Skin into a Template
      • How To use Pop-Up Comments in your evoSkin
      • How to add a smilie to your toolbar
      • How to display the posts' author
      • Dev Menu
    • Scheduled Tasks Reference
  • Operations Reference
  • Advanced Topics
  • Glossary
  • Archives
Photo gallery software

This online manual is powered by b2evolution CMS – A complete engine for your website.

About b2evolution

  • What is it?
  • Features
  • Getting Started
  • Screenshots
  • Online demo
  • Testimonials
  • Design philosophy
  • Free & open source
  • Terms of service

Downloads

  • Latest releases
  • Skins
  • Plugins
  • Language packs

About us

  • About us
  • Contact

Webhosting Guide

  • Web hosting blog
  • Best web hosting
  • Cheap web hosting
  • Green web hosting
  • Hosting with SSH
  • VPS hosting
  • Dedicated servers
  • Reseller hosting
  • Int'l: UK / France

Docs & Support

  • Online manual
  • Forums
  • Hire a pro !

Other

  • Adsense
  • Press room
  • Privacy policy

Stay in touch

  • GitHub
  • Twitter
  • Facebook
  • LinkedIn
  • News blog
  • RSS feed
  • Atom feed

Founded & Maintained by François Planque