• I have created a new page on WordPress and I know how to edit the HTML and CSS of that page.
    However what if I want to edit the functionality? Lets say I want to a button to redirect to some other page etc.
    How do I edit the PHP of a new page?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You have to edit the .php file used in that page it depends on how the theme is structured and where you want your edit to go.

    If you want to change the footer of all pages for example, then you go to footer.php. You might need to edit The Loop if you want to add to the page/post content and so on. Research template heirarchy in the Codex.

    You can get a plugin to show you which files are called for which page (Reveal Template and others). You should consder making such changes in a Child Theme.

    You might be able to achieve what you want using a Widget.

    Thread Starter David Ar

    (@david-ar)

    But what I want to edit is just a normal page created by clicking “Pages” then “Create new” on WordPress. Is this really theme depended?

    I’m afraid you have me a bit confused.

    Can you say a little more about what you want to do?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to edit the PHP of a new page’ is closed to new replies.