Skip to main content

Forums

This topic contains 1 reply, has 2 voices, and was last updated by  Atelierbram 3 months, 1 week ago.

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

    miraziz
    Participant

    Hi,
    In my site theme, this code is for get the child category

    php child_cat (get_the_ID(), 'poetname', [1261]);
    How i can get child and parent category together?

    #286190

    Atelierbram
    Participant

    Use a php conditional statement with the && operator combining the two function statements. Search for get_category_parents in WordPress function reference.

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

You must be logged in to reply to this topic.

icon-link icon-logo-star icon-search icon-star