Title: single_cat_slug php implode
Last modified: August 21, 2016

---

# single_cat_slug php implode

 *  [mcfester](https://wordpress.org/support/users/mcfester/)
 * (@mcfester)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/single_cat_slug-php-implode/)
 * Hi, I’m trying implode a file from another server into category template and 
   use the category slug as the file name, but having trouble with the code.
    This
   is my implode code that works with just a single file name: `<?php echo implode("",
   file( "http://www.example.co.uk/ls/category.php") ); ?>` So I want to add this
   to implode the slug.php instead of category.php: `<?php $cat = get_term_by('name',
   single_cat_title('',false), 'category'); echo $cat->slug; ?>` So how do I get
   them both working together? Ive tried putting the second code in place of category
   but it messes things up

The topic ‘single_cat_slug php implode’ is closed to new replies.

## Tags

 * [category](https://wordpress.org/support/topic-tag/category/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [template](https://wordpress.org/support/topic-tag/template/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [mcfester](https://wordpress.org/support/users/mcfester/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/single_cat_slug-php-implode/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
