Display the contents of a custom field of a page on their child

Let’s see if anyone knows how to accomplish the following:
I have a custom field, which is a textarea where the user can enter any text. The idea is that if a page is filled in that field, the entered content appears on all child pages.

CASE 1

Read More
  • Page 1
  • Page 1.1 (the user fills out the custom field and displays the
    content)
  • Page 1.1.1 (displays the contents of the field completed on Page
    1.1)
  • Page 1.1.2 (displays the contents of the field completed on Page
    1.1)
  • Page 1.1.3 (displays the contents of the field completed on Page
    1.1)

CASE 2

  • Page 1 (the user fills out the custom field and displays the content)
  • Page 1.1 (displays the contents of the field completed on Page 1)
  • Page 1.2 (the user fills in the field, so it inherits from Page 1.1, but shows your own)
  • Page 1.2.1 (displays the contents of the field completed on Page 1.2)

I hope I explained well with the examples of what I get.

Thank you in advance.

Related posts

Leave a Reply

1 comment