• Resolved 3stripe

    (@3stripe)


    I’m trying to add a new variable to Coffee2Code’s extension to show customizable post listings…

    I want ‘the_category’ to simply display the category of each post. But because my PHP is really bad I can only get it to display on the page using ‘echo’, when I really want to assign it to the variable ‘new’.

    Can anyone help me out?

    case '%the_category%':
    foreach((get_the_category()) as $cat) {
    echo $cat->cat_name;
    $new = $cat;
    }
    break;

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hacking c2c_get_recent_posts – need some php help’ is closed to new replies.