single_cat_slug php implode (1 post)

  1. mcfester
    Posted 2 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic