WordPress Page file modification, inserting code just for certain page types/levels

aidenhera

BANNED
Joined
Nov 30, 2016
Messages
3,059
Reaction score
902
Is there a way to insert code automatically at the end of the post for example but just for pages of certain, custom type, or only child/parent pages?

I have edited the theme files so i have a download button that is added under every page. But now i added more pages where i DO NOT want that button. I want it to be inserted automatically like now, but just for parent pages :) and for child either no code or other code.

Any clue, programmers?
 
Back
Top