Forums

[resolved] is_category for Custom Field (2 posts)

  1. digiman999
    Member
    Posted 2 years ago #

    In index.php, I'm calling specific Custom Fields for specific Categories only. The second half of the below code works fine (at displaying the 'Feedback'). The first part however, does not work fine (at displaying 'Feedback' only if the parent category 'Singles' is being displayed from. Is the first part right/completely wrong/slightly there?

    <?php
    
    is_category('Singles');
    if ($is_category=="Singles") 
    
    $values = get_post_custom_values("Feedback");
    if(!empty($values)) {
        $feedback = "Feedback";
        echo $feedback . $values[0] . '<br />' . '<br />';
    }   ?>

    Cheers

  2. digiman999
    Member
    Posted 2 years ago #

    Just found a solution, thanks all the same.

Topic Closed

This topic has been closed to new replies.

About this Topic