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.