Skip to main content

Forums

  • This topic is empty.
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