1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Blogging' started by aidenhera, Mar 7, 2017.

  1. aidenhera

    aidenhera Elite Member

    Joined:
    Nov 30, 2016
    Messages:
    1,865
    Likes Received:
    402
    Gender:
    Male
    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?