-1

I have WordPress 4.1.1 installed. I want to be able to write PHP code for specific pages. I found an answer on here which seemed like the best option I have come across so far, this answer can be found here:

How to add a PHP page to WordPress?

But - this does not seem to work and I cannot figure out why.

I followed the steps accordingly and I was able to complete all steps with no problem but when I preview the page its blank.

My only guess is that this might have something to do with version 4.1.1 - is there any reason this method would not work with version 4.1.1?

Your help is greatly appreciated.

Community
  • 1
  • 1
Sarah92
  • 87
  • 11

2 Answers2

1

If you need to add PHP to a page you need to open your themes template files in a text editor of your choice.

If enabled, access the Theme Editor from the Administration > Appearance > Editor menu.

http://codex.wordpress.org/Appearance_Editor_SubPanel

If your pages are blank you might have an error with your PHP code.

dojs
  • 497
  • 2
  • 11
0

Personally I use this plugin: https://wordpress.org/plugins/php-code-for-posts/

However you can also use custom page templates: http://codex.wordpress.org/Page_Templates#Creating_a_Page_Template

It depends what your personal code needs are.

Michael Doye
  • 8,063
  • 5
  • 40
  • 56