Home Forums Plugin Support WP User Frontend Pro Display custom fields post based on category

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Tareq Hasan 5 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #9404

    Danilo
    Participant
    Post count: 43

    Hi.
    I need to display custom fields in posts, but only if these posts are inside certain category.

    How can I set this in SINGLE.PHP?

    #9428

    Tareq Hasan
    Keymaster
    Post count: 2831

    Try using this code:
    [php]if ( is_category( 13 ) ) {
    echo wpuf_show_custom_fields( ” );
    }
    [/php]

    Replace your category ID in that code, it should work.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Display custom fields post based on category’ is closed to new replies.