Support » Everything else WordPress » How to let get_the_ID() function return the id of the current page correct?

  • Hi! There is a wordpress installation with woocommerce. Each page like, for example, product category page, consists of several templates, combined together. For example, after the header, i have “afterheader” template, where i want to show something, depending on product category id.

    To achive this i use get_the_ID() function in this template. But it returns the id of template, not id of the product category page. Which function i can use to detect the id of whole page in the template or which approach?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.