Title: functions.php concatenate return
Last modified: August 11, 2018

---

# functions.php concatenate return

 *  [jujukp](https://wordpress.org/support/users/jujukp/)
 * (@jujukp)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/functions-php-concatenate-return/)
 * Hello,
 * I have a function which is working well to return a maximum length on my woocommerce
   products descriptions.
 * Here is the code:
 *     ```
       add_filter('woocommerce_short_description', 'reigel_woocommerce_short_description', 10, 1);
       function reigel_woocommerce_short_description($post_excerpt){
           if (!is_product()) {
               $post_excerpt = substr($post_excerpt, 0, 80);
           }
           return $post_excerpt;
       }
       ```
   
 * I would like to concatenate the $post-excerpt var with a string which contains“…”
   to get something like that as my description:
 * “blabla blabla…” instead of just “blabla blabla”.
 * Can you help me please ?
 * Thanks.

Viewing 1 replies (of 1 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [7 years, 10 months ago](https://wordpress.org/support/topic/functions-php-concatenate-return/#post-10581620)
 * you mean this?
 * `return $post_excerpt . '...' ;`

Viewing 1 replies (of 1 total)

The topic ‘functions.php concatenate return’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/functions-php-concatenate-return/#post-10581620)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
