Title: Custom &#8216;Read More&#8217; button using &lt;a class=&#8221;button&#8221;  with php
Last modified: August 19, 2016

---

# Custom ‘Read More’ button using <a class=”button” with php

 *  [orbital2000](https://wordpress.org/support/users/orbital2000/)
 * (@orbital2000)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/custom-read-more-button-using-lta-classbutton-with-php/)
 * Here’s what I’m attempting to do. I’d like to have post excerpts with a limited
   number of words, with a custom ‘read more’ button.
 * Currently I’m using the following to set a limited number of words for my excerpts.
 * `<?php if ($post->post_excerpt != "" ) {the_excerpt();}else {the_content_rss('',
   FALSE, '', 40);}?>`
 * 

The topic ‘Custom ‘Read More’ button using <a class=”button” with php’ is closed
to new replies.

## Tags

 * [custom read more](https://wordpress.org/support/topic-tag/custom-read-more/)
 * [more button](https://wordpress.org/support/topic-tag/more-button/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [orbital2000](https://wordpress.org/support/users/orbital2000/)
 * Last activity: [16 years, 4 months ago](https://wordpress.org/support/topic/custom-read-more-button-using-lta-classbutton-with-php/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
